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
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,2).
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
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 11 2008
STATUS
approved