OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
From G. C. Greubel, Jan 02 2024: (Start)
a(n) = 2*a(n-1) - a(n-2), for n >= 6.
a(n) = 3*n + 10 - 11*[n=1] + [n=2] + [n=3].
G.f.: x*(2 + 13*x - 12*x^2 - x^3 + x^4)/(1 - x)^2.
E.g.f.: (10 + 3*x)*exp(x) - 10 - 11*x + x^2/2! + x^3/3!. (End)
MATHEMATICA
Join[{2, 17, 20}, 10+3*Range[4, 70]] (* G. C. Greubel, Jan 02 2024 *)
PROG
(Magma) [2, 17, 20] cat [3*n+10: n in [4..70]]; // G. C. Greubel, Jan 02 2024
(SageMath) [2, 17, 20]+[3*n+10 for n in range(4, 71)] # G. C. Greubel, Jan 02 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Oct 12 2002
EXTENSIONS
Terms a(11) onward added by G. C. Greubel, Jan 02 2024
STATUS
approved