A295976 Number of nonnegative solutions to (x,y) = 1 and x^3 + y^3 = n.
0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 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, 2, 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, 2
Offset: 0
Keywords
Examples
For 1729, a(1729) = 4, because the following four ordered pairs, (1,12), (9,10), (10,9) and (12,1) satisfy the condition, as 1^3 + 12^3 = 9^3 + 10^3 = 1729. - _Antti Karttunen_, May 31 2021
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65537
Programs
-
PARI
{a(n) = sum(i=0, n, sum(j=0, n, if((gcd(i, j)==1) && (i^3+j^3==n), 1, 0)))}
-
PARI
A295976(n) = { my(s=0); for(i=0, oo, i3 = i^3; forstep(j=n-i3, 0, -1, if((i3+j^3==n) && gcd(i, j)==1, s++)); if(i3>n, return(s))); }; \\ Antti Karttunen, May 31 2021
Comments