A280293 a(0) = 3, a(n+1) = 2*a(n) + periodic sequence of length 2: repeat [-5, 4].
3, 1, 6, 7, 18, 31, 66, 127, 258, 511, 1026, 2047, 4098, 8191, 16386, 32767, 65538, 131071, 262146, 524287, 1048578, 2097151, 4194306, 8388607, 16777218, 33554431, 67108866, 134217727, 268435458, 536870911, 1073741826, 2147483647, 4294967298, 8589934591
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
Programs
-
Mathematica
LinearRecurrence[{2,1,-2},{3,1,6},50] (* Paolo Xausa, Nov 13 2023 *)
-
PARI
Vec((3-5*x+x^2) / ((1-x)*(1+x)*(1-2*x)) + O(x^40)) \\ Colin Barker, Dec 31 2016
Formula
a(2n) = 4^n + 2. a(2n+1) = 2*4^n - 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n>2.
a(n) = 2^n + periodic sequence of length 2: repeat [2, -1].
a(n) = 2^(n+2) - A280173(n).
a(n+2) = a(n) + 3*2^n, a(0) = 3, a(1) = 1.
G.f.: (3-5*x+x^2) / ((1-x)*(1+x)*(1-2*x)). - Colin Barker, Dec 31 2016
Extensions
More terms from Colin Barker, Dec 31 2016
Comments