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!)
A302293 Number of positive integer pairs (x,y) such that there exist positive integers p and q satisfying p*x^2 + q*y = n. 1
0, 1, 2, 3, 5, 7, 8, 10, 10, 14, 15, 17, 19, 21, 22, 24, 26, 30, 30, 33, 34, 39, 36, 44, 41, 47, 44, 52, 49, 57, 54, 59, 58, 66, 59, 66, 69, 73, 71, 80, 75, 85, 79, 88, 80, 95, 82, 98, 91, 100, 98, 110, 100, 112, 104, 118, 113, 125, 109, 133, 121, 130, 115, 136, 126, 147, 131, 147, 138, 152, 135, 159, 146, 162, 145 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(5)=5: the pairs are (1, 2), (1, 3), (1, 4), (2, 1), (1, 1).
PROG
(Python)
def sets(n):
s = set()
for i in range(1, n):
for j in range(1, i+1):
if i%j==0:
for k in range(1, n-i+1):
if (n-i)%(k**2)==0:
s.add((k, j))
return len(s)
[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=1, n, sum(y=1, n, isok(x^2, y, n))); \\ Michel Marcus, May 14 2018
(Python)
from sympy import divisors, integer_nthroot
def A302293(n):
s = set()
for i in range(1, n):
for j in divisors(i):
if integer_nthroot(j, 2)[1]:
for k in divisors(n-i):
s.add((j, k))
return len(s) # Chai Wah Wu, May 26 2018
CROSSREFS
Sequence in context: A272667 A076385 A152604 * A266347 A028788 A197128
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 April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)