Jon Perry on Tue, 17 Jun 2003 13:15:21 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

ceil bug


Working upon A001399, I developed the formula:

s(n)=6*t(floor(n/6))+(n%6)*(floor(n/6)+1)

with t(n)=n*(n+1)/2

Due to a typing mistake, I inadvertently typed:

s=6*t(floor(n/6))+(n%6)*(floor(n/6)+1)

and Pari produced 1/12*n^2 + 1/2*n

Testing this doesn't produce the sequence in question, however:

for(i=1,20,print1(ceil(1/12*i^2+1/2*i)","))

does.

(There is an minor additional rule; a(6k)=s(n)+1.)

Jon Perry
perry@globalnet.co.uk
http://www.users.globalnet.co.uk/~perry/maths/
http://www.users.globalnet.co.uk/~perry/DIVMenu/
BrainBench MVP for HTML and JavaScript
http://www.brainbench.com