OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = (2 - 5*n + 25*n^2)/2.
G.f.: (1+4*x)^2/(1-x)^3.
a(n) = a(n-1) + 25*n - 15 with a(0)=1. - Vincenzo Librandi, Aug 08 2010
E.g.f.: (1/2)*(2 + 20*x + 25*x^2)*exp(x). - G. C. Greubel, May 26 2021
EXAMPLE
a(1)=25*1+1-15=11; a(2)=25*2+11-15=46; a(3)=25*3+46-15=106.
MATHEMATICA
((10*Range[0, 40]-1)^2 +7)/8 (* G. C. Greubel, May 26 2021 *)
PROG
(PARI) a(n)=5*n*(5*n-1)/2+1 \\ Charles R Greathouse IV, Jun 16 2017
(Magma) [(2-5*n+25*n^2)/2: n in [0..50]]; // G. C. Greubel, May 26 2021
(Sage) [((10*n-1)^2 +7)/8 for n in (0..40)] # G. C. Greubel, May 26 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 23 2003
STATUS
approved