A376691 The number of solutions to x + y == x^2 + y^2 == x^3 + y^3 (mod n) with 0 <= x <= y < n.
1, 3, 3, 5, 3, 10, 3, 7, 5, 10, 3, 16, 3, 10, 10, 7, 3, 18, 3, 16, 10, 10, 3, 24, 7, 10, 5, 16, 3, 36, 3, 11, 10, 10, 10, 28, 3, 10, 10, 24, 3, 36, 3, 16, 18, 10, 3, 24, 9, 26, 10, 16, 3, 18, 10, 24, 10, 10, 3, 56, 3, 10, 18, 11, 10, 36, 3, 16, 10, 36
Offset: 1
Keywords
Links
- Math StackExchange, If x+y == x^2+y^2 == x^3+y^3 (mod n), is it true that x+y==x^4+y^4(mod n)?.
Crossrefs
Cf. A376646.
Programs
-
Maple
a:=proc(n) local x,y,count; count:=0: for x from 0 to n-1 do for y from x to n-1 do if (x+y) mod n =(x^2+y^2) mod n and (x+y) mod n =(x^3+y^3) mod n then count:=count+1; fi; od: od: count; end:
-
Python
def A376691(n): c = 0 for x in range(n): m = x*(1-x)%n c += sum(1 for y in range(x,n) if y*(y-1)%n == m and not m*(x-y)%n) return c # Chai Wah Wu, Oct 02 2024
Comments