login
Numbers n such that n^2 + (n+1)^2 + (n+2)^2 is equal to the sum of the heptagonal numbers H(m), H(m+1) and H(m+2) for some m.
2

%I #9 Jan 28 2020 14:05:54

%S 27,378,40365,546516,58207743,788077134,83935526481,1136406682152,

%T 121034970979299,1638697647587490,174532344216624117,

%U 2363000871414479868,251675519325400998855,3407445617882032383606,362915924334884023726233

%N Numbers n such that n^2 + (n+1)^2 + (n+2)^2 is equal to the sum of the heptagonal numbers H(m), H(m+1) and H(m+2) for some m.

%C Also nonnegative integers y in the solutions to 15*x^2-6*y^2+21*x-12*y+6 = 0, the corresponding values of x being A251769.

%H Colin Barker, <a href="/A251770/b251770.txt">Table of n, a(n) for n = 1..633</a>

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

%F a(n) = a(n-1)+1442*a(n-2)-1442*a(n-3)-a(n-4)+a(n-5).

%F G.f.: -9*x*(x^3+117*x^2+39*x+3) / ((x-1)*(x^2-38*x+1)*(x^2+38*x+1)).

%e 27 is in the sequence because 27^2+28^2+29^2 = 729+784+841 = 2354 = 697+783+874 = H(17)+H(18)+H(19).

%t LinearRecurrence[{1,1442,-1442,-1,1},{27,378,40365,546516,58207743},20] (* _Harvey P. Dale_, Jan 28 2020 *)

%o (PARI) Vec(-9*x*(x^3+117*x^2+39*x+3)/((x-1)*(x^2-38*x+1)*(x^2+38*x+1)) + O(x^100))

%Y Cf. A000290, A000566, A251769.

%K nonn,easy

%O 1,1

%A _Colin Barker_, Dec 08 2014