OFFSET
0,9
COMMENTS
See A104156 for an order 2 example.
b(n) = a(2n)-floor(sqrt(n))+1 is an infinite binary word consisting of a sequence of block (0,1) and single 0's where 0's occur when n is of form k^2-1, k>=2 i.e. b(n) begins for n>=1 : (0,1),0,(0,1),(0,1),0,(0,1),(0,1),(0,1),0,(0,1),... and single 0's occur at n=3,8,15,...
REFERENCES
B. Cloitre, On strange predictible recursions, preprint 2006
FORMULA
abs(a(2n-1)) = A004738(n)-1 where sign(a(2*n-1)) alternates between 2 consecutive zeros.
PROG
(PARI) an=vector(10000); an[1]=0; an[2]=0; an[3]=1; a(n)=if(n<0, 0, an[n]);
for(n=4, 10000, an[n]=abs(a(n-1)-a(n-2))-a(n-3))
an
CROSSREFS
KEYWORD
sign
AUTHOR
Benoit Cloitre, May 30 2006
STATUS
approved