login
A376427
The number of distinct values of x+y+z+w (mod n) when x*y*z*w = 1 (mod n)
2
1, 1, 3, 1, 5, 3, 7, 2, 5, 5, 11, 3, 13, 7, 15, 4, 17, 5, 19, 5, 21, 11, 23, 6, 25, 13, 15, 7, 29, 15, 31, 8, 33, 17, 35, 5, 37, 19, 39, 10, 41, 21, 43, 11, 25, 23, 47, 12, 49, 25, 51, 13, 53, 15, 55, 14, 57, 29, 59, 15, 61, 31, 35, 16, 65, 33, 67, 17, 69, 35, 71, 10, 73, 37, 75, 19, 77, 39, 79, 20, 45, 41, 83, 21, 85, 43, 87, 22, 89, 25
OFFSET
1,3
COMMENTS
The values of n for which a(n) = n seem to agree with A325128. But I have no proof.
MAPLE
a:=proc(n)
local x, y, z, w, N;
N:={};
for x from 0 to n-1 do
for y from x to n-1 do
for z from y to n-1 do
for w from z to n-1 do
if (x*y*z*w) mod n = 1 mod n then N:=N union {(x+y+z+w) mod n}; fi;
od:
od:
od:
od:
nops(N);
end:
PROG
(Python)
def A376427(n):
s = set()
for x in range(n):
for y in range(x, n):
xy, xyp = x*y%n, (x+y)%n
for z in range(y, n):
try:
s.add((xyp+z+pow(xy*z%n, -1, n))%n)
except:
continue
return len(s) # Chai Wah Wu, Sep 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
W. Edwin Clark, Sep 22 2024
STATUS
approved