login
A396582
a(n) = 4*a(n - 2) - 2*a(n - 1) for n >= 2, a(0) = 1, a(1) = 6.
2
1, 6, -8, 40, -112, 384, -1216, 3968, -12800, 41472, -134144, 434176, -1404928, 4546560, -14712832, 47611904, -154075136, 498597888, -1613496320, 5221384192, -16896753664, 54679044096, -176945102848, 572606382080, -1852993175552, 5996411879424, -19404796461056
OFFSET
0,2
FORMULA
a(n) = -(-2)^n * (F(n) + L(n-1)) where F ~ Fibonacci A000045 and L ~ Lucas A000032.
a(n) = [x^n] (1 + 8*x) / (1 + 2*x - 4*x^2).
a(n) = n! * [x^n] exp(-x)*(7*sinh(r*x)/r + cosh(r*x)) where r = sqrt(5).
a(n) = ((1 - 7/r) * (-r - 1)^n + (1 + 7/r) * (r - 1)^n) / 2 where r = sqrt(5).
2^n * a(-n) = A000285(n).
a(n) / 2^n = A396201(n).
MAPLE
a := n -> ((1 - 7/sqrt(5)) * (-sqrt(5) - 1)^n + (1 + 7/sqrt(5)) * (sqrt(5) - 1)^n )/2: seq(simplify(a(n)), n = 0..26);
MATHEMATICA
LinearRecurrence[{-2, 4}, {1, 6}, 27] (* James C. McMahon, May 30 2026 *)
PROG
(Python)
def A396582gen(bound):
a, b = 1, 6
if bound >= 1: yield a
if bound >= 2: yield b
for _ in range(2, bound):
c = 4 * a - 2 * b
yield c
a, b = b, c
for v in A396582gen(27): print(v, end=", ")
(SageMath)
a = BinaryRecurrenceSequence(-2, 4, 1, 6)
print([a(i) for i in range(27)])
CROSSREFS
Cf. A396201, A000032 (Lucas), A000045 (Fibonacci), A000285.
Sequence in context: A038262 A054102 A261063 * A000380 A154153 A164640
KEYWORD
sign,easy
AUTHOR
Peter Luschny, May 29 2026
STATUS
approved