OFFSET
1,3
COMMENTS
The values of n for which a(n) = n seem to agree with A325128. But I have no proof.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1688
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