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.

Original entry on oeis.org

1, 3, 2, 4, 7, 8, 10, 13, 13, 31, 24, 20, 37, 44, 38, 47, 59, 59, 66, 86, 53, 108, 96, 77, 137, 171, 100, 120, 159, 186, 170, 179, 135, 279, 230, 172, 253, 312, 220, 337, 307, 259, 322, 306, 331, 456, 384, 303, 369, 669, 366, 500, 503, 488, 588, 469, 409, 767, 600
Offset: 1

Views

Author

W. Edwin Clark, Sep 14 2024

Keywords

Comments

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.

Programs

  • Maple
    a:=proc(n)
    local x,y,z,w,N;
    N:=0:
    for x from 0 to n-1 do
     for y from x to n-1 do
      for z from y to n-1 do
       if (x+y+z-x*y*z) mod n = 0 then N:=N + 1; fi;
      od:
     od:
    od:
    N;
    end:
  • 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
    
  • Python
    def A376183(n):
        c = 0
        for x in range(n):
            for y in range(x,n):
                xy,xyp = x*y%n-1,(x+y)%n
                c += sum(not (xy*z-xyp)%n for z in range(y,n))
        return c # Chai Wah Wu, Sep 19 2024

Extensions

More terms from Hugo Pfoertner, Sep 15 2024