OFFSET
1,1
COMMENTS
Because y^2-k^2=(y-k)(y+k), a method to make k as small as possible is to try to make y-k and y+k as nearly equal as possible.
Because each of y-k and y+k are made up of primes of form 1 mod 4, algebra shows that k=a(n) is always even.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..36
EXAMPLE
For n=3, m = 5*13*17. The "middle" most nearly equal divisor and codivisor of m are y-k=17 and y+k=65, whence a(n) = (65 - 17)/2 = 24.
PROG
(Python)
from math import prod, isqrt
from itertools import islice
from sympy import sieve, divisors
def A350813(n):
m = prod(islice(filter(lambda p: p % 4 == 1, sieve), n))
a = isqrt(m)
d = max(filter(lambda d: d <= a, divisors(m, generator=True)))
return (m//d-d)//2 # Chai Wah Wu, Mar 29 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Richard Peterson, Jan 17 2022
EXTENSIONS
Terms corrected by and more terms from Jinyuan Wang, Mar 17 2022
STATUS
approved