OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (5,-7,3).
FORMULA
From R. J. Mathar, Apr 27 2010: (Start)
a(n)= 5*a(n-1) - 7*a(n-2) + 3*a(n-3).
G.f.: (1+x)*(5*x-2) / ( (3*x-1)*(x-1)^2 ). (End)
E.g.f.: exp(x)*(1 + exp(2*x) + 3*x). - Stefano Spezia, Aug 19 2024
EXAMPLE
a(7) = (3^7) + (3*7) + 1 = 2209 = 47^2.
PROG
(Magma) [3^n + 3*n + 1: n in [0..30]]; // Vincenzo Librandi, May 09 2011
(PARI) a(n)=3^n+3*n+1 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Apr 26 2010
EXTENSIONS
Corrected (1 replaced by 2, 2209 inserted) by R. J. Mathar, Apr 27 2010
STATUS
approved