login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A336240
Numbers k such that k = x^2+y^2+z^2 = x^3+y^3+z^3 for some integers x,y,z.
1
0, 1, 2, 3, 6, 27, 29, 354, 729, 2027, 6859, 7778, 19846, 20577, 23277, 35937, 58754, 130979, 132651, 232282, 265602, 332750, 389017, 499853, 885602, 970299, 1492779, 2146689, 2413154, 3764477, 4330747, 5694978, 5929741, 8120601, 8388227, 12068354, 14348907, 17005629, 23522402, 24137569, 31999403, 34328125
OFFSET
1,3
COMMENTS
Contains (2*m^2 + 1)^3 corresponding to x=2*m^2+1, y=-z=2*m^3+m, and m^6/2 - 3*m^2/2 + 3 corresponding to x=-m^2+1, y=-m^3/2+m/2+1, z=m^3/2-m/2+1.
Are there other infinite parametric families of solutions?
EXAMPLE
a(6)=27 is in the sequence because 27 = (-3)^2 + 3^2 + 3^2 = (-3)^3 + 3^3 + 3^3.
a(7)=29 is in the sequence because 29 = (-2)^2 + (-3)^2 + 4^2 = (-2)^3 + (-3)^3 + 4^3.
MAPLE
N:= 2*10^5: # for all terms <= N
R:= NULL:
for xx from 0 while 3*xx^2 <= N do
for yy from xx while xx^2 + 2*yy^2 <= N do
for zz from yy while xx^2 + yy^2 + zz^2 <= N do
t:= xx^2 + yy^2 + zz^2;
c:= [xx^3, yy^3, zz^3];
if member(t, {seq(seq(seq(e1*c[1]+e2*c[2]+e3*c[3], e1=[-1, 1]), e2=[-1, 1]), e3=[-1, 1])}) then R:= R, t; fi
od od od:
sort(convert({R}, list));
MATHEMATICA
NN = 2*10^5; (* for all terms <= NN *)
R = {};
Module[{x, y, z, t, c}, For[x = 0, 3*x^2 <= NN, x++, For[y = x, x^2 + 2^2 <= NN, y++, For[z = y, x^2 + y^2 + z^2 <= NN, z++, t = x^2 + y^2 + z^2; c = {x^3, y^3, z^3}; If[MemberQ[Flatten@Table[{e1, e2, e3}. c, {e1, {-1, 1}}, {e2, {-1, 1}}, {e3, {-1, 1}}], t], Print[t]; AppendTo[R, t]]]]]];
R // Union (* Jean-François Alcover, Aug 11 2023, after Robert Israel *)
CROSSREFS
Cf. A336205.
Sequence in context: A090445 A228346 A269996 * A336458 A348867 A018318
KEYWORD
nonn
AUTHOR
Robert Israel, Jul 13 2020
EXTENSIONS
a(27)-a(35) from David A. Corneth, Jul 13 2020
a(36)-a(42) from Andrew R. Booker, Jul 14 2020
STATUS
approved