cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A134738 Cubes which are not the sum of three squares.

This page as a plain text file.
%I A134738 #21 Feb 15 2025 02:18:24
%S A134738 343,3375,12167,21952,29791,59319,103823,166375,216000,250047,357911,
%T A134738 493039,658503,778688,857375,1092727,1367631,1404928,1685159,1906624,
%U A134738 2048383,2460375,2924207,3442951,3796416,4019679,4657463,5359375
%N A134738 Cubes which are not the sum of three squares.
%C A134738 This sequence was inspired by e-mail from Ray Chandler, Nov 07 2007
%H A134738 Robert Israel, <a href="/A134738/b134738.txt">Table of n, a(n) for n = 1..10000</a>
%F A134738 a(n) = A004215(n)^3. - _Ray Chandler_, Jan 29 2009
%p A134738 N:= 10^10: # to get all terms <= N
%p A134738 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
%t A134738 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*)
%t A134738 Select[Range[200]^3,SquaresR[3,#]==0&] (* _Harvey P. Dale_, Feb 03 2015 *)
%o A134738 (Python)
%o A134738 def A134738(n):
%o A134738     def bisection(f,kmin=0,kmax=1):
%o A134738         while f(kmax) > kmax: kmax <<= 1
%o A134738         kmin = kmax >> 1
%o A134738         while kmax-kmin > 1:
%o A134738             kmid = kmax+kmin>>1
%o A134738             if f(kmid) <= kmid:
%o A134738                 kmax = kmid
%o A134738             else:
%o A134738                 kmin = kmid
%o A134738         return kmax
%o A134738     def f(x): return n+x-sum(((x>>(i<<1))-7>>3)+1 for i in range(x.bit_length()>>1))
%o A134738     return bisection(f,n,n)**3 # _Chai Wah Wu_, Feb 14 2025
%Y A134738 Cf. A004215, A134739.
%K A134738 nonn
%O A134738 1,1
%A A134738 _Artur Jasinski_, Nov 07 2007
%E A134738 Extended by _Ray Chandler_, Jan 29 2009