login
First of three consecutive triangular numbers that add up to a perfect square.
1

%I #36 Mar 01 2024 10:49:18

%S 0,15,105,2016,11628,203203,1152921,19968040,113108320,1957220895,

%T 11084786065,191793185496,1086209028828,18793829460003,

%U 106437529743441,1841604033412080,10429792989769440,180458406785594575,1022013288177368025,17683082313822046576

%N First of three consecutive triangular numbers that add up to a perfect square.

%H Harvey P. Dale, <a href="/A319588/b319588.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,108,-108,-982,982,108,-108,-1,1).

%F a(n) = A000217(A165517(n)). - _Alois P. Heinz_, Sep 24 2018

%F From _Colin Barker_, Sep 24 2018: (Start) Heinz's formula implies a g.f. and a recurrence:

%F G.f.: x^2*(15 + 90*x + 291*x^2 - 108*x^3 - 83*x^4 + 2*x^5 + x^6) / ((1 - x)*(1 - 10*x + x^2)*(1 + 10*x + x^2)*(1 - 10*x^2 + x^4)).

%F a(n) = a(n-1) + 108*a(n-2) - 108*a(n-3) - 982*a(n-4) + 982*a(n-5) + 108*a(n-6) - 108*a(n-7) - a(n-8) + a(n-9) for n>9.

%F (End)

%t Select[Partition[Accumulate[Range[2500000]],3,1],IntegerQ[Sqrt[ Total[ #]]]&] [[All,1]]

%t (#(#+1))/2&/@LinearRecurrence[{1,10,-10,-1,1},{0,5,14,63,152},20]

%t LinearRecurrence[{1, 108, -108, -982, 982, 108, -108, -1, 1},{0, 15, 105, 2016, 11628, 203203, 1152921, 19968040, 113108320},20] (* _Ray Chandler_, Mar 01 2024 *)

%o (PARI) concat(0, Vec(x^2*(15 + 90*x + 291*x^2 - 108*x^3 - 83*x^4 + 2*x^5 + x^6) / ((1 - x)*(1 - 10*x + x^2)*(1 + 10*x + x^2)*(1 - 10*x^2 + x^4)) + O(x^40))) \\ _Colin Barker_, Sep 24 2018

%Y Cf. A000217, A165517.

%K nonn

%O 1,2

%A _Harvey P. Dale_, Sep 23 2018