OFFSET
1,1
COMMENTS
Found on a quiz.
3*(8*a(n) - 37) = A016945(n-1)^2. - Vincenzo Librandi, Feb 15 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 3*n + a(n-1) - 3 with a(1)=5. - Vincenzo Librandi, Nov 28 2009
G.f.: x*(5 - 7*x + 5*x^2)/(1-x)^3. - Colin Barker, Jan 14 2012
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {5, 8, 14}, 50] (* Vincenzo Librandi, Feb 15 2012 *)
Table[(3x^2-3x+10)/2, {x, 50}] (* Harvey P. Dale, Jul 25 2019 *)
Accumulate[3*Range[0, 50]]+5 (* Harvey P. Dale, Jan 16 2024 *)
PROG
(Magma) I:=[5, 8, 14]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Feb 15 2012
(PARI) a(n)=3*n*(n+1)/2+5 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ruben Fritzon (ruben.fritzon(AT)edu.ovanaker.se), Dec 11 2006
EXTENSIONS
More terms from Graham Roy (groy(AT)ashland.edu), Dec 14 2006
Additional comments from Christopher N. Swanson (cswanson(AT)ashland.edu), R. J. Mathar, Dec 14 2006
STATUS
approved