login
A376757
Number of pairs 0 <= x <= y <= n-1 such that x^3 == y^3 (mod n).
5
1, 2, 3, 5, 5, 6, 13, 14, 18, 10, 11, 15, 25, 26, 15, 28, 17, 36, 37, 25, 39, 22, 23, 42, 35, 50, 81, 71, 29, 30, 61, 72, 33, 34, 65, 99, 73, 74, 75, 70, 41, 78, 85, 55, 90, 46, 47, 84, 112, 70, 51, 137, 53, 162, 55, 218, 111, 58, 59, 75, 121, 122, 288, 208, 125, 66, 133, 85, 69, 130, 71, 306, 145, 146, 105, 203, 143, 150, 157
OFFSET
1,2
COMMENTS
A087786 includes pairs (x,y) with x>y (which are excluded from the present sequence).
LINKS
PROG
(PARI) a(n) = sum(x=0, n-1, sum(y=x, n-1, Mod(x, n)^3 == Mod(y, n)^3)); \\ Michel Marcus, Oct 06 2024
(Python)
from collections import Counter
def A376757(n): return sum(d*(d+1)>>1 for d in Counter(pow(x, 3, n) for x in range(n)).values()) # Chai Wah Wu, Oct 06 2024
KEYWORD
nonn
AUTHOR
Tom Duff and N. J. A. Sloane, Oct 06 2024
STATUS
approved