OFFSET
1,1
REFERENCES
GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 79.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
From Chai Wah Wu, Apr 23 2023: (Start)
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n > 4.
G.f.: x*(-x^3 + x^2 - 4*x + 2)/((x - 1)^3*(2*x - 1)). (End)
MATHEMATICA
Table[n^2 + 2^(n-1), {n, 50}] (* Paolo Xausa, Jul 20 2024 *)
PROG
(Python)
def A362438(n): return n**2+(1<<n-1) # Chai Wah Wu, Apr 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 21 2023
STATUS
approved