login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230314 Numbers that are simultaneously the sum of two nonnegative squares and the sum of two nonnegative cubes. 2
0, 1, 2, 8, 9, 16, 64, 65, 72, 125, 128, 250, 370, 468, 512, 520, 576, 637, 729, 730, 793, 1000, 1024, 1125, 1241, 1332, 1458, 1853, 2000, 2197, 2205, 2745, 2960, 3528, 3744, 3925, 4096, 4097, 4160, 4394, 4608, 4706, 4825, 4913, 4941, 5096, 5256, 5832, 5840 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
72 is in the sequence because 6^2 + 6^2 = 4^3 + 2^3 = 72.
73 is not in the sequence, because, although it can be expressed as the sum of two squares (8^2 + 3^2), it can't be expressed as the sum of two cubes.
MAPLE
s_sq0:=proc(n) local i, f; f:=false:
for i from 0 while 2*i^2<=n do
if type(sqrt(n-i^2), nonnegint) then f:=true:break fi od;
f end;
s_cb0:=proc(n) local i, f; f:=false:
for i from 0 while 2*i^3<=n do
if type(surd(n-i^3, 3), nonnegint) then f:=true:break fi od;
f end;
for n from 0 do if s_sq0(n) and s_cb0(n)then print(n) fi od:
MATHEMATICA
n2 = 80; n3 = Ceiling[n2^(2/3)]; t2 = Flatten[Table[a^2 + b^2, {a, 0, n2}, {b, a, n2}]]; t3 = Flatten[Table[a^3 + b^3, {a, 0, n3}, {b, a, n3}]]; Intersection[Union[Select[t2, # <= n2^2 &]], Union[Select[t3, # <= n3^3 &]]] (* T. D. Noe, Oct 18 2013 *)
CROSSREFS
Sequence in context: A046679 A004999 A105125 * A220263 A033492 A126160
KEYWORD
nonn
AUTHOR
Vladimir Letsko, Oct 15 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)