login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
1
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, 62, 93, 68, 141, 48, 157, 91, 120, 94, 150, 78, 207, 112, 154, 108, 241, 84, 259, 138, 170, 150, 295, 116, 289, 144, 232, 178, 353, 136, 304, 188, 274, 210, 413, 132
OFFSET
1,4
COMMENTS
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
FORMULA
Moebius transform of A274108. - Andrew Howroyd, Nov 10 2024
PROG
(Python)
def a(n):
count = 0
for a in range(1, n+1):
for b in range(a + 1, n+1):
if gcd(a, b) == 1:
for x in range(1, n+1):
for y in range(1, n+1):
if gcd(x, y) == 1 and a * x + b * y == n:
count += 1
return count
print([a(n) for n in range(1, 21)])
(Python)
from math import gcd
from sympy import divisors
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
(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
(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
CROSSREFS
Sequence in context: A100710 A069913 A326002 * A072403 A010078 A074639
KEYWORD
nonn
AUTHOR
Anshveer Bindra, Nov 08 2024
EXTENSIONS
a(21) onwards from Andrew Howroyd, Nov 10 2024
STATUS
approved