OFFSET
0,2
COMMENTS
Numbers n whose binary representation is 100, n times.
LINKS
FORMULA
a(n) = 8*a(n-1) + 4 with n>0, a(0)=0. - Vincenzo Librandi, Nov 13 2010
From Colin Barker, Oct 15 2012: (Start)
a(n) = 9*a(n-1) - 8*a(n-2).
G.f.: 4*x/((x-1)*(8*x-1)). (End)
EXAMPLE
a(3)=292 because 292 translated in base 2 is three times 100: 100100100.
From Zerinvary Lajos, Jan 14 2007: (Start)
Octal............Decimal
0......................0
4......................4
44....................36
444..................292
4444................2340
44444..............18724
444444............149796
4444444..........1198372
44444444.........9586980
444444444.......76695844
4444444444.....613566756,
etc. (End)
MATHEMATICA
Table[ FromDigits[ Flatten[ Table[{1, 0, 0}, {i, n}]], 2], {n, 0, 19}] (* Robert G. Wilson v, Jun 01 2005 *)
s=0; lst={s}; Do[s+=2^n; AppendTo[lst, s], {n, 2, 5!, 3}]; lst (* Vladimir Joseph Stephan Orlovsky, Nov 07 2008 *)
NestList[8#+4&, 0, 20] (* Harvey P. Dale, Aug 08 2013 *)
PROG
(PARI) a(n)=if(n<0, 0, (8^n-1)*4/7) /* Michael Somos */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alexandre Wajnberg, May 31 2005
EXTENSIONS
More terms from Robert G. Wilson v, Jun 01 2005
STATUS
approved