OFFSET
1,1
COMMENTS
Numbers that can be written as 3*a*(a^2 + 2*b^2) = (a-b)^3 + a^3 + (a+b)^3 where 0 < b < a. - Robert Israel, Dec 15 2022
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
153 = 1^3 + 3^3 + 5^3, with 3 - 1 = 5 - 3 = 2;
972 = 3^3 + 6^3 + 9^3, with 6 - 3 = 9 - 6 = 3.
MAPLE
N:= 10000: # for terms <= N
S:= {}:
for a from 1 while a^3 + (a+1)^3 + (a+2)^3 <= N do
for d from 1 do
x:= a^3 + (a+d)^3 + (a+2*d)^3;
if x > N then break fi;
S:= S union {x}
od od:
sort(convert(S, list)); # Robert Israel, Dec 14 2022
PROG
(PARI) for(n=3, 7000, k=(n/3)^(1/3); a=2; v=0; while(a<=k&&v==0, b=(n-3*a^3)/(6*a); if(b==truncate(b)&&issquare(b), d=sqrt(b), d=0); if(d>=1&&d<=a-1, v=1; print1(n, ", ")); a+=1))
(PARI) w=List(); for(n=3, 7000, k=(n/3)^(1/3); for(a=2, k, for(c=1, a-1, v=(a-c)^3+a^3+(a+c)^3; if(v==n, listput(w, n))))); print(vecsort(Vec(w), , 8))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antonio Roldán, Jan 29 2019
STATUS
approved