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.

Showing 1-1 of 1 results.

A375004 Number of ordered primitive solutions (x,y,z,w) to x*y + x*z + x*w + y*z + y*w + z*w = n with x,y,z,w >= 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 4, 6, 0, 4, 0, 12, 8, 0, 0, 16, 6, 12, 4, 12, 0, 16, 12, 24, 8, 0, 12, 34, 0, 24, 8, 30, 12, 16, 0, 36, 32, 24, 12, 32, 6, 36, 16, 36, 12, 40, 12, 72, 8, 0, 24, 64, 24, 48, 32, 30, 24, 56, 12, 72, 8, 48, 24, 70, 24, 60, 32, 54, 24, 40, 12, 120, 62, 24, 24, 76, 24, 96, 32
Offset: 1

Views

Author

Seiichi Manyama, Jul 27 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(x=1, n, sum(y=1, n, sum(z=1, n, sum(w=1, n, (gcd([x, y, z, w])==1)*(x*y+x*z+x*w+y*z+y*w+z*w==n)))));
    
  • Python
    from math import gcd
    from sympy import divisors, integer_nthroot
    def A375004(n):
        k = 0
        for c in range(1,n-1):
            for d in divisors(c,generator=True):
                for x in range(1,d):
                    y = d-x
                    xy = x*y
                    a = (c//d)**2
                    b = a-(n-c-xy<<2)
                    if b>=0:
                        q,r = integer_nthroot(b,2)
                        if r:
                            w = c//d+q>>1
                            z = c//d-w
                            if 1<=w>1
                                z = c//d-w
                                if 1<=wChai Wah Wu, Jul 27 2024
Showing 1-1 of 1 results.