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.

A377812 Number of quadruples of positive integers (x,y,a,b) such that a < b, gcd(a,b) = gcd(x,y) = 1 and a*x + b*y = n.

This page as a plain text file.
%I A377812 #32 Dec 11 2024 15:41:29
%S A377812 0,0,1,2,5,4,11,9,15,12,27,14,37,22,32,31,59,26,71,38,58,48,97,42,99,
%T A377812 62,93,68,141,48,157,91,120,94,150,78,207,112,154,108,241,84,259,138,
%U A377812 170,150,295,116,289,144,232,178,353,136,304,188,274,210,413,132
%N A377812 Number of quadruples of positive integers (x,y,a,b) such that a < b, gcd(a,b) = gcd(x,y) = 1 and a*x + b*y = n.
%C A377812 Number of partitions of n into parts with exactly two different sizes, the sizes being relatively prime and also the multiplicities of the two part sizes being relatively prime. - _Andrew Howroyd_, Nov 10 2024
%F A377812 Moebius transform of A274108. - _Andrew Howroyd_, Nov 10 2024
%o A377812 (Python)
%o A377812 def a(n):
%o A377812     count = 0
%o A377812     for a in range(1, n+1):
%o A377812         for b in range(a + 1, n+1):
%o A377812             if gcd(a, b) == 1:
%o A377812                 for x in range(1, n+1):
%o A377812                     for y in range(1, n+1):
%o A377812                         if gcd(x, y) == 1 and a * x + b * y == n:
%o A377812                             count += 1
%o A377812     return count
%o A377812 print([a(n) for n in range(1,21)])
%o A377812 (Python)
%o A377812 from math import gcd
%o A377812 from sympy import divisors
%o A377812 def A377812(n): return sum(1 for ax in range(1,n-1) for a in divisors(ax,generator=True) for b in divisors(n-ax,generator=True) if a<b and gcd(a,b)==gcd(ax//a,(n-ax)//b)==1) # _Chai Wah Wu_, Dec 11 2024
%o A377812 (PARI) a(n)={sum(b=2, n-1, sum(y=1, (n-1)\b, my(s=n-b*y); sumdiv(s, a, a<b && gcd(a,b)==1 && gcd(s/a,y)==1)))} \\ _Andrew Howroyd_, Nov 10 2024
%o A377812 (PARI) seq(n)={my(v=Vec(sum(k=1, n-1, numdiv(k)*x^k, O(x^n))^2, -n), u=vector(n, n, moebius(n))); dirmul(dirmul(u,u), vector(#v, n, v[n]+numdiv(n)-sigma(n))/2)} \\ _Andrew Howroyd_, Nov 10 2024
%Y A377812 Cf. A002133, A274108.
%K A377812 nonn
%O A377812 1,4
%A A377812 _Anshveer Bindra_, Nov 08 2024
%E A377812 a(21) onwards from _Andrew Howroyd_, Nov 10 2024