login
A178615
Smaller of two consecutive numbers that are not the sum of 3 nonzero squares.
1
1, 4, 7, 15, 31, 39, 63, 79, 111, 127, 159, 207, 231, 239, 255, 319, 367, 399, 447, 495, 511, 519, 591, 623, 639, 751, 831, 879, 927, 959, 1007, 1023, 1135, 1263, 1279, 1359, 1391, 1471, 1519, 1599, 1647, 1775, 1791, 1903, 1983, 2031, 2047, 2079, 2159, 2287
OFFSET
1,2
COMMENTS
{1,2,4,5,7,8,10,13,15,16,20,23,25,28,31,32,..}->{1,4,7,15,31,..}
MATHEMATICA
q=66; q2=q^2+2; lst={}; Do[Do[Do[z=a^2+b^2+c^2; If[z<=q2, AppendTo[lst, z]], {c, b, 1, -1}], {b, a, 1, -1}], {a, q}]; lst; u=Union@lst; a=Complement[Range[q^2], u]; lst={}; Do[If[a[[n+1]]-a[[n]]==1, AppendTo[lst, a[[n]]]], {n, Length[a]-1}]; lst
CROSSREFS
Sequence in context: A301204 A116969 A131090 * A131935 A119749 A201498
KEYWORD
nonn
AUTHOR
STATUS
approved