OFFSET
1,2
COMMENTS
For n > 1, a(n) is square if and only if n-1 is in A081016.
a(n) and a(-n) give all numbers m such that 5*m-4 is a square. - Bruno Berselli, Feb 03 2016
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = a(n-1) + 10*n - 17, with a(1)=1. - Vincenzo Librandi, Nov 26 2010
From G. C. Greubel, Jan 30 2016 (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3, a(1)=1, a(2)=4, a(3)=17.
G.f.: x*(1 + x + 8*x^2)/(1-x)^3.
E.g.f.: (5*x^2 - 7*x + 8)*exp(x) - 8. (End)
EXAMPLE
MATHEMATICA
Table[8 -12x +5x^2, {x, 50}]
s = 1; lst = {s}; Do[s += n + 2; AppendTo[lst, s], {n, 1, 450, 10}]; lst (* Zerinvary Lajos, Jul 11 2009 *)
LinearRecurrence[{3, -3, 1}, {1, 4, 17}, 51] (* G. C. Greubel, Jan 30 2016 *)
PROG
(PARI) for(n=1, 50, print1(8-12*n+5*n^2, ", ")) \\ Klaus Brockhaus, Oct 29 2008
(Magma) [8-12*n+5*n^2: n in [1..50]]; // G. C. Greubel, Jul 15 2019
(Sage) [8-12*n+5*n^2 for n in (1..50)] # G. C. Greubel, Jul 15 2019
(GAP) List([1..50], n-> 8-12*n+5*n^2); # G. C. Greubel, Jul 15 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Oct 26 2008
EXTENSIONS
Corrected definition; corrected comment; added keyword. - Klaus Brockhaus, Oct 29 2008
STATUS
approved