login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest number m so that n^2 + A000330(m) is also a square, i.e., n^2 + (1 + 4 + 9 + 16 + ... + m^2) = w^2 for some w.
2

%I #13 Nov 19 2017 22:12:38

%S 1,47,2,5,767,16,1727,22,17,13,18,112,10,70,8,10799,12287,21,82,17327,

%T 31,15,255,16,10,13,9,5,49,40367,43199,117,17,1630,7,58799,10,65711,

%U 34,73007,49,13,64,29,17,6,9,30,42,309,8,124847,17,31,139967,13,150527,15

%N Smallest number m so that n^2 + A000330(m) is also a square, i.e., n^2 + (1 + 4 + 9 + 16 + ... + m^2) = w^2 for some w.

%C I.e., a(n) is the least solution to n^2 + (x(x+1)(2x+1)/6) = w^2; a(n) is the length of shortest sum of consecutive squares from 1 to a(n) which when added to n^2 gives a new square.

%F n^2 + (1 + 4 + 9 + ... + a(n)^2) = w^2, where w depends also on n; i.e., sum of consecutive squares from 1, 4, ... to a(n)^2 + n^2 is also a square.

%e n = 3: a(3) = 5 because n^2 + 1 + 4 + 9 + 16 + 25 = 9 + (1 + 4 + 9 + 16 + 25) = 64 = 8*8; n = 4: a(4) = 767 because n^2 + (1 + 4 + ... + 767^2) = 150700176 = 12276*12726, where 767 is the length of the shortest such consecutive-square sequence which provides (when summed) a new square, namely 12276^2. Often the least solution is rather large. E.g., at n = 93, a(n) = 415151, which means that 93^2 + A000330(415151) = 8649 + (long square sum) = 154436265^2 = 23850559947150225 is the smallest such square number, sum odd distinct consecutive squares except one repetition(8649).

%t s=n^2 Do[s=s+m^2; If[IntegerQ[Sqrt[s]], Print[m]], {m, 1, 500000}] (* gives solutions of which the smallest is entered into the sequence *)

%Y Cf. A000330, A065311, A065312, A065313, A065314, A065315.

%K nonn

%O 0,2

%A _Labos Elemer_, Nov 07 2001