Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 May 13 2013 01:54:21
%S 1,3,7,7,21,4,19,1,37,31,39,5,2,57,67,73,7,7,103,6,133,133,147,157,18,
%T 7,1,211,237,7,259,273,301,1,13,10,4,9,403,421,3,8,487,19,541,553,579,
%U 11,637,651,9,703,31,757,26,9,853,871,903,13,27,2,1027,1,1101,11,1159,1191
%N Least k > 0 such that nk = x^3 + y^3 for nonnegative coprime x and y.
%C Broughan calls this eta(n) and proves that it exists for all n.
%H Charles R Greathouse IV, <a href="/A212286/b212286.txt">Table of n, a(n) for n = 2..1000</a>
%H Kevin A. Broughan, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Broughan/broughan25.html">Characterizing the Sum of Two Cubes</a>, J. Integer Seqs., Vol. 6, 2003.
%H <a href="/index/Su#ssq">Index entries for sequences related to sums of cubes</a>
%F a(n) <= 2n^2 + 6, a(a(n)) <= n.
%e 4 is not the sum of two nonnegative cubes. 8 = 0^3 + 2^3, but 0 and 2 are not coprime. The least multiple of 4 that can be so represented is 28 = 1^3 + 3^3, so a(4) = 28/4.
%o (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
%o sumOfTwoRPCubes(n)=if(sumOfTwoCubes(n),if(vecmax(factor(n)[,2])<3,1,for(x=ceil((n\2)^(1/3)),(n+.5)^(1/3),if(gcd(n,x)==1&&ispower(n-x^3,3),return(1)));0),0)
%o a(n)=forstep(k=n,2*n*(n^2+3),n,if(sumOfTwoRPCubes(k),return(k/n)))
%Y Cf. A004999, A212285, A202679.
%K nonn
%O 2,2
%A _Charles R Greathouse IV_, Jun 12 2012