OFFSET
1,3
COMMENTS
Broughan calls this theta(n) and proves that it exists for all n.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..1000
Kevin A. Broughan, Characterizing the Sum of Two Cubes, J. Integer Seqs., Vol. 6, 2003.
FORMULA
a(n) <= A212286(n) <= 2n^2 + 6, a(a(n)) <= n.
EXAMPLE
3 is not the sum of two nonnegative cubes, nor is 6. But 9 = 2^3 + 1^3 and so a(3) = 9/3 = 3.
PROG
(PARI) sumOfTwoCubes(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
a(n)=forstep(k=n, 2*n*(n^2+3), n, if(sumOfTwoCubes(k), return(k/n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Jun 12 2012
STATUS
approved