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.

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

Original entry on oeis.org

1, 2, 6, 7, 14, 18, 27, 34, 51, 59, 91, 96, 134, 136, 208, 203, 285, 261, 385, 373, 493, 487, 650, 616, 818, 750, 949, 947, 1240, 1146, 1517, 1397, 1766, 1662, 2089, 1824, 2443, 2309, 2723, 2638, 3311, 2977, 3801, 3482, 4024, 3962, 4900, 4382, 5525, 5023, 6078
Offset: 1

Views

Author

W. Edwin Clark, Sep 19 2024

Keywords

Crossrefs

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