A296185 Numbers that are not the sum of 3 squares and an 8th power.
112, 240, 368, 496, 624, 752, 880, 1008, 1136, 1264, 1392, 1520, 1648, 1776, 1904, 2032, 2160, 2288, 2416, 2544, 2672, 2800, 2928, 3056, 3184, 3312, 3440, 3568, 3696, 3824, 3952, 4080, 4208, 4336, 4464, 4592, 4720, 4848, 4976, 5104, 5232, 5360, 5488, 5616
Offset: 1
Keywords
Links
- Wikipedia, Legendre's three-square theorem
Programs
-
Mathematica
t1={}; Do[Do[If[x^2+y^2+z^2+w^8==n, AppendTo[t1,n]&&Break[]], {x,0,n^(1/2)}, {y,x,(n-x^2)^(1/2)}, {z,y,(n-x^2-y^2)^(1/2)}, {w,0,(n-x^2-y^2-z^2)^(1/8)}], {n,0,5700}]; t2={}; Do[If[FreeQ[t1,k]==True, AppendTo[t2,k]], {k,0,5700}]; t2
-
Python
from itertools import count, islice def A296185_gen(): # generator of terms for k in count(0): r = 1<<((k<<1)+1<<2) yield from range(7*r,r*((r<<8)+7),r<<3) A296185_list = list(islice(A296185_gen(),44)) # Chai Wah Wu, May 21 2025
Comments