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 (1, 2, -2, -1, 1).
FORMULA
a(2n) = 10*n^2 - 8*n + 1.
a(2n+1) = 10*n^2 + 8*n + 1.
G.f.: (x^4+2x^3+14x^2+2x+1)/((1-x)^3*(1+x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - G. C. Greubel, May 20 2016
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 3, 19, 25, 57}, 50] (* G. C. Greubel, May 20 2016 *)
PROG
(PARI) is(n)=issquare(10*n+6) \\ Charles R Greathouse IV, Jan 31 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved