login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152732 a(n) + a(n+1) + a(n+2) = 2^n. 2
0, 0, 2, 2, 4, 10, 18, 36, 74, 146, 292, 586, 1170, 2340, 4682, 9362, 18724, 37450, 74898, 149796, 299594, 599186, 1198372, 2396746, 4793490, 9586980, 19173962, 38347922, 76695844, 153391690, 306783378, 613566756, 1227133514, 2454267026, 4908534052 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
0 + 0 + 2 = 2^1; 0 + 2 + 2 = 2^2; 2 + 2 + 4 = 2^3; 2 + 4 + 10 = 2^4; ...
With a(0)=1, a(n) is the number of length n strings in the language over alphabet {0,1} generated by the regular expression: ((0+1)(0*(11)*)*10)*. - Geoffrey Critzer, Jan 25 2014
LINKS
FORMULA
From R. J. Mathar, Dec 12 2008: (Start)
a(n) = 2*A077947(n-3).
G.f.: 2*x^3/((1-2*x)*(1+x+x^2)). (End)
a(n) = (1/21)*(3*2^n + 18*cos((2*n*Pi)/3) + 2*sqrt(3)*sin((2*n*Pi)/3)). - Zak Seidov, Dec 12 2008
MATHEMATICA
k0=k1=0; lst={k0, k1}; Do[kt=k1; k1=2^n-k1-k0; k0=kt; AppendTo[lst, k1], {n, 1, 5!}]; lst
LinearRecurrence[{1, 1, 2}, {0, 0, 2}, 70] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
PROG
(PARI) concat([0, 0], Vec(2/(1-2*x)/(1+x+x^2)+O(x^99))) \\ Charles R Greathouse IV, Feb 24 2012
(Magma) I:=[0, 0, 2]; [n le 3 select I[n] else Self(n-1) +Self(n-2) +2*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 01 2018
CROSSREFS
Sequence in context: A320069 A002082 A005304 * A308986 A100088 A217212
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)