This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A376427 #18 Jun 02 2025 15:28:08 %S A376427 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, %T A376427 29,15,31,8,33,17,35,5,37,19,39,10,41,21,43,11,25,23,47,12,49,25,51, %U A376427 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 %N A376427 The number of distinct values of x+y+z+w (mod n) when x*y*z*w = 1 (mod n). %C A376427 The values of n for which a(n) = n seem to agree with A325128. But I have no proof. %H A376427 Chai Wah Wu, <a href="/A376427/b376427.txt">Table of n, a(n) for n = 1..1688</a> %p A376427 a:=proc(n) %p A376427 local x,y,z,w,N; %p A376427 N:={}; %p A376427 for x from 0 to n-1 do %p A376427 for y from x to n-1 do %p A376427 for z from y to n-1 do %p A376427 for w from z to n-1 do %p A376427 if (x*y*z*w) mod n = 1 mod n then N:=N union {(x+y+z+w) mod n}; fi; %p A376427 od: %p A376427 od: %p A376427 od: %p A376427 od: %p A376427 nops(N); %p A376427 end: %o A376427 (Python) %o A376427 def A376427(n): %o A376427 s = set() %o A376427 for x in range(n): %o A376427 for y in range(x,n): %o A376427 xy, xyp = x*y%n, (x+y)%n %o A376427 for z in range(y,n): %o A376427 try: %o A376427 s.add((xyp+z+pow(xy*z%n,-1,n))%n) %o A376427 except: %o A376427 continue %o A376427 return len(s) # _Chai Wah Wu_, Sep 23 2024 %Y A376427 Cf. A376296, A376183, A180783. %K A376427 nonn %O A376427 1,3 %A A376427 _W. Edwin Clark_, Sep 22 2024