%I M4999 N2152 #56 Feb 28 2018 10:30:41
%S 1,16,25,33,49,52,64,73,97,100,121,148,169,177,193,196,241,244,249,
%T 256,276,289,292,297,313,337,361,388,393,400,409,457,481,484,528,529,
%U 537,577,592,625,628,649,673,676,708,724,753,772,784,793,832,841,852,897,913,961,964,976,996
%N Numbers n such that the sum of the squares of n consecutive positive odd numbers x^2 + (x+2)^2 + ... + (x+2n-2)^2 = k^2 for some integer k. The least values of x and k for each n are in A056131 and A056132, respectively.
%C Papers by Sollfrey, Hunter and Makowski correct and extend the work of Alfred. However, they do not consider n = 97, 241, 244, 276, 528 and 832, which are in this sequence. I have verified that there are no other n < 1000. - _T. D. Noe_, Oct 24 2007
%C A134419 shows how A001032 and this sequence are related. - _T. D. Noe_, Nov 04 2007
%C The number 4 is not in this sequence due to the requirement that the odd integers be positive, otherwise 6^2 = (-1)^2 + 1^2 + 3^2 + 5^2.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Christopher E. Thompson, <a href="/A001033/b001033.txt">Table of n, a(n) for n = 1..7103</a> (up to 250000, extending first 100 terms computed by T. D. Noe).
%H U. Alfred, <a href="http://www.jstor.org/stable/2688675">Sums of squares of consecutive odd integers</a>, Math. Mag., 40 (1967), 194-199.
%H J. A. H. Hunter, <a href="http://www.jstor.org/stable/2689131">A note on sums of squares of consecutive odd numbers</a>, Math. Mag. 42 (1969), 145.
%H Andrzej Makowski, <a href="http://www.jstor.org/stable/2688834">Remark on the paper "Sums of squares of consecutive odd numbers"</a>, Math. Mag. 43 (1970), 212-213.
%H William Sollfrey, <a href="http://www.jstor.org/stable/2688809">Note on sums of squares of consecutive odd integers</a>, Math. Mag. 41 (1968), 255-258.
%F We must solve m*(3*x^2 + 6*m*x - 6*x + 4*m^2 - 6*m + 2)/3 = k^2 in integers (x, m, k). - _N. J. A. Sloane_
%F For a given n, we must determine whether the generalized Pell equation 4n*y^2 + 4y*n^2 + n(4n^2-1)/3 = k^2 has any integer solutions with y >= 0. Note that x = 2y+1 will be the first odd number being squared. If there are solutions then n is in this sequence. - _T. D. Noe_, Oct 24 2007
%e a(1) = 1 from 1^2.
%e a(2) = 16 from 27^2 + 29^2 + ... + 55^2 + 57^2 = 172^2.
%e a(4) = 33 from 91^2 + 93^2 + ... + 153^2 + 155^2 = 715^2.
%t r[1] = {True, {1, 1}}; r[n_] := (rn = Reduce[x > 0 && k > 0 && Sum[(x + 2*j)^2, {j, 0, n - 1}] == k^2, {x, k}, Integers]; srn = Simplify[(rn /. C[1] -> 0) || (rn /. C[1] -> 1) || (rn /. C[1] -> 2)]; rnOdd = Which[rn === False, False, srn[[0]] === And, srn, True, Select[srn, OddQ[x /. ToRules[#1]] & ]]; If[ rnOdd === False, {False, {0, 0}}, {True, {x, k} /. Flatten[{ToRules[rnOdd]}]}]); A001033 = Reap[Do[rn = r[n]; {x0, k0} = rn[[2]]; If[rn[[1]] && OddQ[x0], Print[{n, x0, k0}]; Sow[n]], {n, 1, 1000}]][[2, 1]] (* _Jean-François Alcover_, Mar 14 2012 *)
%Y Cf. A056131, A056132, A274470.
%K nonn,nice,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _Robert G. Wilson v_
%E Corrected and extended by _T. D. Noe_, Oct 24 2007
%E 1024 was missing from b-file. - _Christopher E. Thompson_, Feb 05 2016