A165516 Perfect squares (A000290) that can be expressed as the sum of three consecutive triangular numbers (A000217).
4, 64, 361, 6241, 35344, 611524, 3463321, 59923081, 339370084, 5871850384, 33254804881, 575381414521, 3258631508224, 56381506772644, 319312633001041, 5524812282304561, 31289379402593764, 541375222159074304, 3066039868821187801, 53049246959306977201, 300440617765073810704, 5198284826789924691364
Offset: 1
Examples
The fourth perfect square that can be expressed as the sum of three consecutive triangular numbers is 6241 (=T63+T64+T65), and hence a(4)=6241.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Tom Beldon and Tony Gardiner, Triangular Numbers and Perfect Squares, The Mathematical Gazette, Vol. 86, No. 507, (2002), pp. 423-431.
- Index entries for linear recurrences with constant coefficients, signature (1,98,-98,-1,1).
Programs
-
Magma
I:=[4, 64, 361, 6241, 35344]; [n le 5 select I[n] else Self(n-1) + 98*Self(n-2) - 98*Self(n-3) - Self(n-4) + Self(n-5): n in [1..50]]; // G. C. Greubel, Oct 21 2018
-
Mathematica
Select[Range[2,1.8 10^7],Mod[Sqrt[24#^2-15],6]==3 &]^2 CoefficientList[Series[(4 + 60 x - 95 x^2 + x^4)/((1 - x) (1 - 10 x + x^2) (1 + 10 x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 14 2014 *) LinearRecurrence[ {1,98,-98,-1,1}, {4, 64, 361, 6241, 35344}, 50] (* G. C. Greubel, Oct 21 2018 *)
-
PARI
Vec(O(x^66)+x*(4+60*x-95*x^2+x^4)/((1-x)*(1-10*x+x^2)*(1+10*x+x^2))) \\ Joerg Arndt, Mar 13 2014
Formula
a(n) = a(n-1) + 98*a(n-2) - 98*a(n-3) - a(n-4) + a(n-5).
a(n) = 98*a(n-2) - a(n-4) - 30. - Ant King, Dec 09 2010
a(n) = (1/32)*(10 -3*(sqrt(6)-3) * (5-2*sqrt(6))^n + (2+ sqrt(6)) * (-5-2*sqrt(6))^n -(sqrt(6)-2) *(2*sqrt(6)-5)^n + 3*(3+sqrt(6)) *(5+2*sqrt(6))^n).
G.f.: x*(4+60*x-95*x^2+x^4)/((1-x)*(1-10*x+x^2)*(1+10*x+x^2)).
Extensions
a(1) = 4 added by N. J. A. Sloane, Sep 28 2009, at the suggestion of Alexander R. Povolotsky
a(16)-a(21) added by Alex Ratushnyak, Mar 12 2014
Comments