OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..825
Index entries for linear recurrences with constant coefficients, signature (17,-14,1).
FORMULA
a(n) = 17*a(n-1) - 14*a(n-2) + a(n-3).
G.f.: x*(1-11*x+x^2)/(1-17*x+14*x^2-x^3). - Colin Barker, Dec 13 2012
EXAMPLE
a(6) = 372259 = 17*23070 - 14*1430 + 89 = 17*a(5) - 14*a(4) + a(3).
MATHEMATICA
LinearRecurrence[{17, -14, 1}, {1, 6, 89}, 20] (* Harvey P. Dale, Mar 14 2022 *)
PROG
(Magma) I:=[1, 6, 89]; [n le 3 select I[n] else 17*Self(n-1) -14*Self(n-2) +Self(n-3): n in [1..31]]; // G. C. Greubel, Feb 05 2023
(SageMath)
@CachedFunction
def a(n): # a = A100297
if (n<3): return (1, 1, 6)[n]
else: return 17*a(n-1) - 14*a(n-2) + a(n-3)
[a(n) for n in range(1, 31)] # G. C. Greubel, Feb 05 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Nov 11 2004
EXTENSIONS
More terms from Colin Barker, Dec 13 2012
New name using g.f. from Joerg Arndt, Aug 31 2024
STATUS
approved