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.

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

This page as a plain text file.
%I A374969 #19 Jul 27 2024 09:40:15
%S A374969 0,0,0,1,0,4,0,6,4,8,0,22,0,12,16,23,0,36,0,42,24,20,0,80,16,24,32,62,
%T A374969 0,104,0,72,40,32,48,151,0,36,48,148,0,152,0,102,120,44,0,242,36,120,
%U A374969 64,122,0,200,80,216,72,56,0,396,0,60,176,201,96,248,0,162,88,280,0,486,0,72,208,182
%N A374969 Number of ordered solutions (x,y,z,w) to x*y + y*z + z*w + w*x = n with x,y,z,w >= 1.
%C A374969 a(n) = 0 if and only if n = 1 or n is prime. - _Chai Wah Wu_, Jul 26 2024
%H A374969 Seiichi Manyama, <a href="/A374969/b374969.txt">Table of n, a(n) for n = 1..1000</a>
%F A374969 a(n) = (n+1)*A000005(n)-2*A000203(n). - _Chai Wah Wu_, Jul 26 2024
%e A374969 a(6) = 4 since there are solutions (2,1,1,1), (1,2,1,1), (1,1,2,1), (1,1,1,2).
%o A374969 (PARI) a(n) = sum(x=1, n, sum(y=1, n, sum(z=1, n, sum(w=1, n, x*y+y*z+z*w+w*x==n))));
%o A374969 (Python)
%o A374969 from math import prod
%o A374969 from sympy import factorint
%o A374969 def A374969(n):
%o A374969     f = factorint(n).items()
%o A374969     return (n+1)*prod(e+1 for p,e in f)-(prod((p**(e+1)-1)//(p-1) for p,e in f)<<1) # _Chai Wah Wu_, Jul 26 2024
%Y A374969 Cf. A000005, A000203, A066851, A374970.
%K A374969 nonn
%O A374969 1,6
%A A374969 _Seiichi Manyama_, Jul 26 2024