A383176 If p = A002313(n) is a prime such that p = x^2 + y^2, then a(n) is the largest integer k that satisfies x^2 + y^2 - k*x*y > 0.
1, 2, 2, 4, 2, 6, 2, 3, 2, 3, 2, 2, 10, 3, 2, 3, 2, 2, 6, 2, 2, 14, 7, 2, 4, 16, 2, 2, 3, 8, 2, 2, 2, 3, 2, 2, 2, 3, 20, 6, 2, 2, 3, 5, 2, 4, 2, 2, 2, 2, 24, 3, 5, 2, 2, 6, 2, 4, 2, 26, 5, 2, 13, 3, 2, 2, 2, 2, 5, 2, 3, 2, 7, 5, 2, 2, 2, 3, 2, 7, 5, 2, 2, 3
Offset: 1
Keywords
Examples
Since A002313(8) = 53 and 53 = 2^2 + 7^2, we have that 53 - 3*2*7 > 0 and 53 - 4*2*7 < 0, then a(8) = 3.
Programs
-
Python
from itertools import count, islice from sympy import isprime from sympy.solvers.diophantine.diophantine import cornacchia def A383176_gen(): # generator of terms yield 1 for p in count(5,4): if isprime(p): for x,y in cornacchia(1,1,p): yield p//(x*y) A383176_list = list(islice(A383176_gen(),30)) # Chai Wah Wu, Apr 26 2025
Extensions
Definition clarified by Chai Wah Wu, Apr 26 2025
Comments