login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A302294 Number of nonnegative integer pairs (x,y) such that there exist positive integers p and q satisfying p*x + q*y = n. 2
2, 5, 7, 12, 13, 21, 21, 31, 32, 41, 41, 57, 53, 67, 67, 84, 79, 101, 93, 115, 109, 131, 123, 155, 138, 169, 159, 187, 173, 209, 191, 231, 211, 251, 219, 278, 247, 295, 269, 313, 285, 343, 305, 363, 325, 389, 345, 421, 360, 433, 397, 463, 409, 499, 417, 505, 465, 545, 475, 571, 499, 601, 521, 624, 529, 661, 569 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(5)=13; all pairs are (0, 1), (1, 2), (3, 2), (1, 3), (3, 1), (1, 4), (2, 1), (0, 5), (2, 3), (5, 0), (1, 0), (4, 1), (1, 1).
PROG
(Python)
def sets(n):
res = set()
for i in range(n+1):
for j in range(1, n+1):
if i%j==0:
for k in range(1, n+1):
if (n-i)%k==0:
res.add((i//j, (n-i)//k))
return res
[len(sets(i)) for i in range(1, 50)]
(PARI) isok(x, y, n) = {for (p=1, n, for (q=1, n, if (p*x+q*y ==n, return (1)); ); ); return (0); }
a(n) = sum(x=0, n, sum(y=0, n, isok(x, y, n))); \\ Michel Marcus, May 14 2018
(Python)
from __future__ import division
from sympy import divisors, divisor_count
def A302294(n):
s = set()
for i in range(1, (n+3)//2):
for j in divisors(i):
for k in divisors(n-i):
if j != k:
s.add((min(j, k), max(j, k)))
return 3*divisor_count(n)+2*len(s)-1 # Chai Wah Wu, May 21 2018
CROSSREFS
Sequence in context: A265791 A039679 A088823 * A007445 A350129 A159699
KEYWORD
nonn
AUTHOR
Jack Zhang, Apr 04 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)