OFFSET
1,3
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Vladimir Letsko, Oct 15 2013
STATUS
approved