login
Least positive integer x such that x^2 - n = y^3 + z^3 for some positive integers y and z, or 0 if no such x exists.
10

%I #6 Dec 26 2015 03:50:19

%S 6,2,61,47,3283,16,3,6,5,8,12,686,16,4,302,5,13,12,152,6,7,83,5,148,

%T 33,37,6,10,8,11,34,16,7,6,10,8,24,53,16,7,13,52,13,14,30,9,7,8,11,67,

%U 74,22,9,28,8,11,43,115,20,122,23,8,14,48,9,25,11,14,392,14

%N Least positive integer x such that x^2 - n = y^3 + z^3 for some positive integers y and z, or 0 if no such x exists.

%C The conjecture in A266230 implies that a(n) > 0 for all n > 0.

%H Zhi-Wei Sun, <a href="/A266231/b266231.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 6 since 6^2 - 1 = 2^3 + 3^3.

%e a(3) = 61 since 61^2 - 3 = 7^3 + 15^3.

%e a(4) = 47 since 47^2 - 4 = 2^3 + 13^3.

%e a(5) = 3283 since 3283^2 - 5 = 65^3 + 219^3.

%e a(166) = 6554 since 6554^2 - 166 = 175^3 + 335^3.

%e a(635) = 44779 since 44779^2 - 635 = 25^3 + 1261^3.

%t CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)]

%t Do[x=Floor[Sqrt[n]]+1;Label[bb];Do[If[CQ[-n+x^2-y^3],Print[n," ",x];Goto[aa]],{y,1,((-n+x^2)/2)^(1/3)}];x=x+1;Goto[bb];Label[aa];Continue,{n,1,70}]

%Y Cf. A000290, A000578, A003325, A266152, A266153, A266212, A266230.

%K nonn

%O 1,1

%A _Zhi-Wei Sun_, Dec 24 2015