OFFSET

1,1

COMMENTS

This sequence contains no primes since x^3+y^3=(x^2-x*y+y^2)*(x+y). - M. F. Hasler, Apr 12 2008

There are no terms == 3, 4, 5 or 6 mod 9. - Robert Israel, Oct 07 2014

a(n) mod 2: {1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,0,1,1,1,0, ...} - Daniel Forgues, Sep 27 2018

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..902 from M. F. Hasler)

EXAMPLE

9 is in the sequence since 2^3 + 1^3 = 9.

35 is in the sequence since 3^3 + 2^3 = 35.

MAPLE

N:= 10000: # to get all terms <= N

S:= select(`<=`, {seq(seq(i^3 + j^3, j = 1 .. i-1), i = 2 .. floor(N^(1/3)))}, N);

# if using Maple 11 or earlier, uncomment the next line

# sort(convert(S, list));

# Robert Israel, Oct 07 2014

MATHEMATICA

lst={}; Do[Do[x=a^3; Do[y=b^3; If[x+y==n, AppendTo[lst, n]], {b, Floor[(n-x)^(1/3)], a+1, -1}], {a, Floor[n^(1/3)], 1, -1}], {n, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 22 2009 *)

Select[Range@ 1700, Total@ Boole@ Map[And[! MemberQ[#, 0], UnsameQ @@ #] &, PowersRepresentations[#, 2, 3]] > 0 &] (* Michael De Vlieger, May 13 2017 *)

PROG

(PARI) isA024670(n)=for( i=ceil(sqrtn( n\2+1, 3)), sqrtn(n-.5, 3), isA000578(n-i^3) & return(1)) /* One could also use "for( i=2, sqrtn( n\2-1, 3), ...)" but this is much slower since there are less cubes in [n/2, n] than in [1, n/2]. Replacing the -1 here by +.5 would yield A003325, allowing for a(n)=x^3+x^3. Replacing -1 by 0 may miss some a(n) of this form due to rounding errors. - M. F. Hasler, Apr 12 2008 */

(Python)

from itertools import count, takewhile

def aupto(limit):

cbs = list(takewhile(lambda x: x <= limit, (i**3 for i in count(1))))

sms = set(c+d for i, c in enumerate(cbs) for d in cbs[i+1:])

return sorted(s for s in sms if s <= limit)

print(aupto(1674)) # Michael S. Branicky, Sep 28 2021

CROSSREFS

See also: Sums of 2 positive cubes (not necessarily distinct): A003325. Sums of 3 distinct positive cubes: A024975. Sums of distinct positive cubes: A003997. Sums of 2 distinct nonnegative cubes: A114090. Sums of 2 nonnegative cubes: A004999. Sums of 2 distinct positive squares: A004431. Cubes: A000578.

Cf. A373971 (characteristic function).

Indices of nonzero terms in A025468.

KEYWORD

nonn

AUTHOR

EXTENSIONS

Name edited by Zak Seidov, May 31 2011

STATUS

approved