OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,18,0,0,0,-1).
FORMULA
a(1)=1, a(2)=5, a(3)=9, a(4)=13; for n >= 4, if n == 1 (mod 4) then a(n+1) = 6 * a(n) - a(n-1); otherwise, a(n+1) = 2*a(n) - a(n-1).
From Chai Wah Wu, Jun 16 2026: (Start)
a(n) = 18*a(n-4) - a(n-8) for n > 8.
G.f.: x*(-x^7 - x^6 - x^5 - x^4 + 13*x^3 + 9*x^2 + 5*x + 1)/(x^8 - 18*x^4 + 1). (End)
MATHEMATICA
nxt[{n_, a_, b_, c_, d_}]:={n+1, b, c, d, If[Mod[n, 4]==1, 6d-c, 2d-c]}; NestList[nxt, {4, 1, 5, 9, 13}, 30][[All, 2]] (* Harvey P. Dale, Mar 30 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 20 2003
STATUS
approved
