A134738 Cubes which are not the sum of three squares.
343, 3375, 12167, 21952, 29791, 59319, 103823, 166375, 216000, 250047, 357911, 493039, 658503, 778688, 857375, 1092727, 1367631, 1404928, 1685159, 1906624, 2048383, 2460375, 2924207, 3442951, 3796416, 4019679, 4657463, 5359375
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:= 10^10: # to get all terms <= N sort([seq(seq(4^(3*i) * (8*j + 7)^3, j = 0 .. floor((N^(1/3)/4^i - 7)/8)), i = 0 .. floor(log[4](N^(1/3))))]); # Robert Israel, Dec 26 2017
-
Mathematica
b = Table[x^3, {x, 1, 300}]; a = {}; Do[Do[Do[AppendTo[a, (x^2 + y^2 + z^2)^3], {x, 0, 30}], {y, 0, 30}], {z, 0, 30}]; Union[a]; Complement[b, a] (*Artur Jasinski*) Select[Range[200]^3,SquaresR[3,#]==0&] (* Harvey P. Dale, Feb 03 2015 *)
-
Python
def A134738(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): return n+x-sum(((x>>(i<<1))-7>>3)+1 for i in range(x.bit_length()>>1)) return bisection(f,n,n)**3 # Chai Wah Wu, Feb 14 2025
Formula
a(n) = A004215(n)^3. - Ray Chandler, Jan 29 2009
Extensions
Extended by Ray Chandler, Jan 29 2009
Comments