OFFSET
1,1
FORMULA
A number is in this sequence iff it is of the form (k+5j)^3-k^3, where k,j are any positive integers, since (k+d)^3 - k^3 = d(3(k+d/2)^2+d^2/4) = 0 (mod 5) iff d=0 (mod 5), since 3x^2 =-y^2/4 (mod 5) iff x=y=0 (mod 5). - M. F. Hasler, Jun 07 2007
MATHEMATICA
With[{nn=50}, Take[(#[[1]]+5#[[2]])^3-#[[1]]^3&/@Tuples[Range[nn], 2]// Union, nn]] (* Harvey P. Dale, Jan 24 2019 *)
PROG
(PARI) A038853(Nmax=10^4, a=[]) = { local(t, j5); for(j=1, Nmax^(1/3)/5, j5=5*j; for(k=1, sqrt((Nmax/j5-j5^2-3*j5)/3), if(Nmax<t=(k+j5)^3-k^3, next); a=concat(a, t))); vecsort(a) } \\ M. F. Hasler, Jun 07 2007
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by M. F. Hasler, Jun 07 2007
STATUS
approved