OFFSET
1,3
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
Kevin A. Broughan, Characterizing the sum of two cubes, J. Integer Seqs., Vol. 6, 2003.
Samuel S. Wagstaff, Jr., Equal Sums of Two Distinct Like Powers, J. Int. Seq., Vol. 25 (2022), Article 22.3.1.
MATHEMATICA
Union[(#[[1]]^3+#[[2]]^3)&/@Tuples[Range[0, 20], {2}]] (* Harvey P. Dale, Dec 04 2010 *)
PROG
(PARI) is(n)=my(k1=ceil((n-1/2)^(1/3)), k2=floor((4*n+1/2)^(1/3)), L); fordiv(n, d, if(d>=k1 && d<=k2 && denominator(L=(d^2-n/d)/3)==1 && issquare(d^2-4*L), return(1))); 0
list(lim)=my(v=List()); for(x=0, (lim+.5)^(1/3), for(y=0, min(x, (lim-x^3)^(1/3)), listput(v, x^3+y^3))); vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Jun 12 2012
(PARI) is(n)=my(L=sqrtnint(n-1, 3)+1, U=sqrtnint(4*n, 3)); fordiv(n, m, if(L<=m&m<=U, my(ell=(m^2-n/m)/3); if(denominator(ell)==1&&issquare(m^2-4*ell), return(1)))); 0 \\ Charles R Greathouse IV, Apr 16 2013
(PARI) T=thueinit('z^3+1);
is(n)=n==0 || #select(v->min(v[1], v[2])>=0, thue(T, n))>0 \\ Charles R Greathouse IV, Nov 29 2014
(Haskell)
a004999 n = a004999_list !! (n-1)
a004999_list = filter c2 [1..] where
c2 x = any (== 1) $ map (a010057 . fromInteger) $
takeWhile (>= 0) $ map (x -) $ tail a000578_list
-- Reinhard Zumkeller, Dec 20 2013
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved