A141775 Binomial transform of (1, 2, 0, 1, 2, 0, 1, 2, 0, ...).
1, 3, 5, 8, 15, 31, 64, 129, 257, 512, 1023, 2047, 4096, 8193, 16385, 32768, 65535, 131071, 262144, 524289, 1048577, 2097152, 4194303, 8388607, 16777216, 33554433, 67108865, 134217728, 268435455, 536870911, 1073741824, 2147483649, 4294967297, 8589934592, 17179869183
Offset: 0
Examples
a(4) = 8 = (1, 2, 0, 1) dot (1, 3, 3, 1) = (1 + 6 + 0 + 1).
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,2).
Programs
-
Magma
I:=[1,3,5]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
-
Mathematica
LinearRecurrence[{3,-3,2},{1,3,5},40] (* Harvey P. Dale, May 29 2012 *)
-
PARI
x='x+O('x^30); Vec((x-1)*(1+x)/((2*x-1)*(x^2-x+1))) \\ G. C. Greubel, Jan 15 2018
Formula
From Paul Curtz, Jun 15 2011: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^n - A128834(n).
a(n) - 2a(n-1)= A057079(n+1).
a(n) + a(n+3) = 9*2^n.
a(n+6) - a(n) = 63*2^n.
G.f.: (x-1)*(1+x) / ( (2*x-1)*(x^2-x+1) ). - R. J. Mathar, Jun 22 2011
a(n) = 2^n + (2*sin((Pi*n)/3))/sqrt(3). - Colin Barker, Feb 10 2017
Comments