login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Integers n of the form 8k+7 that are sum of distinct squares of the form m, m+1, m+2, m+4, where m == 1 (mod 4).
6

%I #26 Dec 18 2023 12:17:52

%S 39,191,471,879,1415,2079,2871,3791,4839,6015,7319,8751,10311,11999,

%T 13815,15759,17831,20031,22359,24815,27399,30111,32951,35919,39015,

%U 42239,45591,49071,52679,56415,60279,64271,68391,72639,77015,81519,86151,90911,95799

%N Integers n of the form 8k+7 that are sum of distinct squares of the form m, m+1, m+2, m+4, where m == 1 (mod 4).

%C If n is of the form 8k+7 such that n=a^2+b^2+c^2+d^2 with gap pattern 112, then [a,b,c,d]=[1,2,3,5]+[4*i,4*i,4*i,4*i], i>=0.

%H Walter Kehowski, <a href="/A243578/b243578.txt">Table of n, a(n) for n = 1..20737</a>

%H J. Owen Sizemore, <a href="http://www.math.wisc.edu/~josizemore/Notes16%284-square%29.pdf">Lagrange's Four Square Theorem</a>

%H R. C. Vaughan, <a href="https://personal.science.psu.edu/rcv4/Foursq.pdf">Lagrange's Four Square Theorem</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LagrangesFour-SquareTheorem.html">Lagrange's Four-Square Theorem</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lagrange%27s_four-square_theorem">Lagrange's four-square theorem</a>

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

%F a(n) = 64*n^2-40*n+15.

%F From _Colin Barker_, Sep 12 2015: (Start)

%F a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>3.

%F G.f.: -x*(3*x+13)*(5*x+3) / (x-1)^3.

%F (End)

%e a(5)=64*5^2-40*5+15=1415 and m=4*5-3=17, and 1415=17^2+18^2+19^2+21^2.

%p A243578 := proc(n::posint) return 64*n^3-40*n+15 end;

%t LinearRecurrence[{3, -3, 1}, {39, 191, 471}, 50] (* _Vincenzo Librandi_, Sep 13 2015 *)

%o (PARI) Vec(-x*(3*x+13)*(5*x+3)/(x-1)^3 + O(x^100)) \\ _Colin Barker_, Sep 12 2015

%o (Magma) I:=[39,191,471]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..60]]; // _Vincenzo Librandi_, Sep 13 2015

%Y Cf. A008586, A016813, A016825, A004767, A243577, A243578, A243579, A243580, A243581, A243582.

%K nonn,easy

%O 1,1

%A _Walter Kehowski_, Jun 08 2014