A307937 Numbers that can be written as the sum of four or more consecutive squares in more than one way.
3655, 3740, 4510, 4760, 5244, 5434, 5915, 7230, 7574, 8415, 11055, 11900, 12524, 14905, 17484, 18879, 19005, 19855, 20449, 20510, 21790, 22806, 23681, 25580, 25585, 27230, 27420, 28985, 31395, 34224, 37114, 39606, 41685, 42419, 44919, 45435, 45955, 48026, 48139, 48225, 49015, 53941, 57164, 62006
Offset: 1
Keywords
Examples
a(1) = 3655 is in the sequence because 3655 = 8^2 + ... + 22^2 = 25^2 + ... + 29^2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:= 10^5: # to get all terms <= N R:= 'R': dups:= NULL: for m from 4 while m*(m+1)*(2*m+1)/6 <= N do for k from 1 do v:= m*(6*k^2 + 6*k*m + 2*m^2 - 6*k - 3*m + 1)/6; if v > N then break fi; if assigned(R[v]) then dups:= dups, v; else R[v]:= [k, k+m-1]; fi; od od: sort(convert({dups},list));
-
Mathematica
M = 10^5; dups = {}; Clear[rQ]; rQ[_] = False; For[m = 4, m(m+1)(2m+1)/6 <= M, m++, For[k = 1, True, k++, v = m(6k^2 + 6k m + 2m^2 - 6k - 3m + 1)/6; If[v > M, Break[]]; If[rQ[v], AppendTo[dups, v], rQ[v] = True]]]; dups // Sort (* Jean-François Alcover, May 07 2019, after Robert Israel *)
Comments