login
a(n) = 1 if n can be represented as a sum of 2 distinct positive cubes, otherwise 0.
5

%I #20 Jun 24 2024 10:50:33

%S 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,

%T 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,

%U 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1

%N a(n) = 1 if n can be represented as a sum of 2 distinct positive cubes, otherwise 0.

%C Differs from A025468 first at n=1729, where a(1729) = 1, while A025468(1729) = 2.

%H Antti Karttunen, <a href="/A373971/b373971.txt">Table of n, a(n) for n = 0..100080</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(n) = signum(A025468(n)) = [A025468(n) > 0], where [ ] is the Iverson bracket.

%F a(n) <= A373972(n).

%F a(n) <= A373973(n).

%e a(9) = 1 as 9 = 2^3 + 1^3.

%e a(35) = 1 as 35 = 3^3 + 2^3.

%o (PARI) A373971(n) = if(0==n,n,for(i=ceil(sqrtn(n\2+1, 3)), sqrtn(n-(1/2), 3), if(ispower(n-(i^3), 3), return(1))); 0); \\ After _M. F. Hasler_'s Apr 12 2008 program in A024670.

%Y Characteristic function of A024670.

%Y Cf. A010057, A025468, A373972, A373973, A373974 (inverse Möbius transform).

%K nonn

%O 0

%A _Antti Karttunen_, Jun 24 2024