login
A166752
Interleave A007583 and A000012.
2
1, 1, 3, 1, 11, 1, 43, 1, 171, 1, 683, 1, 2731, 1, 10923, 1, 43691, 1, 174763, 1, 699051, 1, 2796203, 1, 11184811, 1, 44739243, 1, 178956971, 1, 715827883, 1, 2863311531, 1, 11453246123, 1, 45812984491, 1, 183251937963, 1, 733007751851, 1
OFFSET
0,3
COMMENTS
Partial sums are A166753.
FORMULA
G.f.: (1+x-2*x^2-4*x^3)/(1-5*x^2+4*x^4).
G.f.: (1+x)/(1-5*x^2+4*x^4) - 2*x^2*(1+2*x)/(1-5*x^2+4*x^4).
a(n) = (4*4^floor(n/2)-1)/3 - 2*floor(2^n/3).
a(n) = 4*4^floor(n/2)/3 - 2*2^n/3 - (-1)^n/3 + 2/3.
a(n) = A002450(floor(n/2)+1) - 2*A000975(n-1).
MATHEMATICA
LinearRecurrence[{0, 5, 0, -4}, {1, 1, 3, 1}, 100] (* G. C. Greubel, May 24 2016 *)
PROG
(PARI) x='x+O('x^50); Vec((1+x-2*x^2-4*x^3)/(1-5*x^2+4*x^4)) \\ G. C. Greubel, Oct 10 2017
(Magma) [(4*4^Floor(n/2)-1)/3 - 2*Floor(2^n/3): n in [0..25]]; // G. C. Greubel, Oct 10 2017
CROSSREFS
Sequence in context: A360121 A339175 A134761 * A205483 A230262 A323854
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 21 2009
STATUS
approved