login
A376756
Number of pairs 0 <= x <= y <= n-1 such that x^2 + x*y + y^2 == 0 (mod n).
5
1, 1, 3, 3, 1, 3, 7, 3, 6, 1, 1, 9, 13, 7, 3, 10, 1, 6, 19, 3, 21, 1, 1, 9, 15, 13, 18, 27, 1, 3, 31, 10, 3, 1, 7, 21, 37, 19, 39, 3, 1, 21, 43, 3, 6, 1, 1, 30, 70, 15, 3, 51, 1, 18, 1, 27, 57, 1, 1, 9, 61, 31, 60, 36, 13, 3, 67, 3, 3, 7, 1, 21, 73, 37, 45, 75, 7, 39, 79, 10, 45, 1, 1, 81, 1, 43, 3, 3, 1, 6, 163, 3, 93, 1, 19, 30, 97
OFFSET
1,3
LINKS
PROG
(Python)
def A376756(n):
c = 0
for x in range(n):
z = x**2%n
for y in range(x, n):
if not (z+y*(x+y))%n:
c += 1
return c # Chai Wah Wu, Oct 06 2024
KEYWORD
nonn
AUTHOR
Tom Duff and N. J. A. Sloane, Oct 06 2024
STATUS
approved