OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1001
Index entries for linear recurrences with constant coefficients, signature (1,34,-34,-1,1).
FORMULA
G.f.: (x^4 + 2*x^3 - 16*x^2 + 2*x + 1)/((1 - x)*(1 - 6*x + x^2)*(1 + 6*x + x^2)).
From Zak Seidov, Sep 25 2010: (Start)
a(n) = 34*a(n-2) - a(n-4) - 11.
a(n) = 2*A124174(n) + 1. (End)
a(n) = (A077443(n)^2 - 1)/2. - Amiram Eldar, Dec 01 2018
MATHEMATICA
Do[a = n(n + 1) + 1; b = Floor[Sqrt[2a]]; If[b(b + 1) == 2a, Print[a]], {n, 1, 106}] (* Robert G. Wilson v *)
Select[Table[n^2+n+1, {n, 0, 206*10^6}], OddQ[Sqrt[8#+1]]&] (* The program takes a long time to run. *) (* Harvey P. Dale, Sep 22 2017 *)
CoefficientList[Series[(x^4 +2*x^3 -16*x^2 +2*x +1)/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)), {x, 0, 50}], x] (* G. C. Greubel, Dec 01 2018 *)
PROG
(PARI) Vec((x^4+2*x^3-16*x^2+2*x+1)/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)) +O(x^66)) /* Joerg Arndt, Mar 25 2013 */
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (x^4 +2*x^3 -16*x^2 +2*x +1)/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)) )); // G. C. Greubel, Dec 01 2018
(Sage) s=((x^4 +2*x^3 -16*x^2 +2*x +1)/((1-x)*(1-6*x+x^2)*(1+6*x+x^2))).series(x, 50); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 02 2002
EXTENSIONS
Program and terms from Robert G. Wilson v
a(18)-a(22) from Alex Ratushnyak, Mar 23 2013
STATUS
approved