OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,34,-34,-1,1).
FORMULA
From Alois P. Heinz, Feb 23 2019: (Start)
G.f.: x*(1+3*x-22*x^2+3*x^3+x^4)/((1-x)*(1+6*x+x^2)*(1-6*x+x^2)).
a(n) = A006452(n)^2 for n >= 1.
MATHEMATICA
LinearRecurrence[{1, 34, -34, -1, 1}, {1, 4, 16, 121, 529}, 25] (* G. C. Greubel, Apr 10 2019 *)
PROG
(PARI) my(x='x+O('x^25)); Vec(x*(1+3*x-22*x^2+3*x^3+x^4)/((1-x)*(1-34*x^2 +x^4))) \\ G. C. Greubel, Apr 10 2019
(PARI) lista(nn) = {for (n=0, nn, if (issquare(cpn = (n^2 + n) / 2 + 1), print1(cpn, ", ")); ); } \\ Michel Marcus, Apr 11 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 25); Coefficients(R!( x*(1+3*x-22*x^2+3*x^3+x^4)/((1-x)*(1-34*x^2 +x^4)) )); // G. C. Greubel, Apr 10 2019
(Sage) a=(x*(1+3*x-22*x^2+3*x^3+x^4)/((1-x)*(1-34*x^2 +x^4))).series(x, 25).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Apr 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Moshe Monk, Feb 23 2019
EXTENSIONS
More terms from Alois P. Heinz, Feb 23 2019
STATUS
approved