A069017 Triangular numbers of the form k^2 + k + 1.
1, 3, 21, 91, 703, 3081, 23871, 104653, 810901, 3555111, 27546753, 120769111, 935778691, 4102594653, 31788928731, 139367449081, 1079887798153, 4734390674091, 36684396208461, 160829915470003, 1246189583289511, 5463482735306001, 42333761435634903
Offset: 1
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).
Crossrefs
Cf. A124174.
Programs
-
Magma
m:=50; R
:=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 -
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 *)
-
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 */
-
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
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
Extensions
Program and terms from Robert G. Wilson v
a(18)-a(22) from Alex Ratushnyak, Mar 23 2013