login
A107751
a(n) = A107750(n+1) - A107750(n).
2
1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2
OFFSET
0,6
LINKS
FORMULA
a(n) = if n<=4 then 1 else 0^(a(n-1)-1) + 0^(a(n-2)-1).
MATHEMATICA
A107751[ nmax_ ] := Length /@ Split[ (Total[ 1 - IntegerDigits[ #1, 2 ] ] &) /@ Range[ 0, nmax ] ]; A107751[ 200 ] - Peter Pein (petsie(AT)dordos.net), Oct 12 2007
PROG
(PARI)
up_to = 65537;
A107751list(up_to) = { my(v=vector(up_to)); v[1]=v[2]=v[3]=v[4]=1; for(n=5, up_to, v[n] = (0^(v[n-1]-1) + 0^(v[n-2]-1))); (v); };
v107751 = A107751list(up_to);
A107751(n) = if(!n, 1, v107751[n]); \\ Antti Karttunen, Dec 23 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 23 2005
STATUS
approved