cp's OEIS Frontend

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.

A376183 The number of solutions x<=y<=z in Z/(n) of the equation x+y+z = x*y*z.

This page as a plain text file.
%I A376183 #31 Jul 23 2025 16:05:56
%S A376183 1,3,2,4,7,8,10,13,13,31,24,20,37,44,38,47,59,59,66,86,53,108,96,77,
%T A376183 137,171,100,120,159,186,170,179,135,279,230,172,253,312,220,337,307,
%U A376183 259,322,306,331,456,384,303,369,669,366,500,503,488,588,469,409,767,600
%N A376183 The number of solutions x<=y<=z in Z/(n) of the equation x+y+z = x*y*z.
%C A376183 Suggested by a discussion initiated by Keith F. Lynch on the MathFun mailing list Sept 8, 2024 about when sums and products of real numbers x,y,z are integers and later raising other similar questions.
%H A376183 Chai Wah Wu, <a href="/A376183/b376183.txt">Table of n, a(n) for n = 1..8450</a> (terms 1..2000 from Hugo Pfoertner)
%p A376183 a:=proc(n)
%p A376183 local x,y,z,w,N;
%p A376183 N:=0:
%p A376183 for x from 0 to n-1 do
%p A376183  for y from x to n-1 do
%p A376183   for z from y to n-1 do
%p A376183    if (x+y+z-x*y*z) mod n = 0 then N:=N + 1; fi;
%p A376183   od:
%p A376183  od:
%p A376183 od:
%p A376183 N;
%p A376183 end:
%o A376183 (PARI) a(n) = sum(x=0, n-1, sum(y=x, n-1, sum(z=y, n-1, Mod(x+y+z-x*y*z, n)==0))); \\ _Michel Marcus_, Sep 15 2024
%o A376183 (Python)
%o A376183 def A376183(n):
%o A376183     c = 0
%o A376183     for x in range(n):
%o A376183         for y in range(x,n):
%o A376183             xy,xyp = x*y%n-1,(x+y)%n
%o A376183             c += sum(not (xy*z-xyp)%n for z in range(y,n))
%o A376183     return c # _Chai Wah Wu_, Sep 19 2024
%K A376183 nonn
%O A376183 1,2
%A A376183 _W. Edwin Clark_, Sep 14 2024
%E A376183 More terms from _Hugo Pfoertner_, Sep 15 2024