A214750 Least m > 0 such that n - m divides n^2 + m^2.
1, 1, 2, 3, 2, 5, 4, 3, 2, 9, 3, 11, 6, 5, 8, 15, 6, 17, 4, 3, 11, 21, 6, 15, 13, 9, 12, 27, 5, 29, 16, 11, 17, 10, 4, 35, 19, 13, 8, 39, 6, 41, 12, 15, 23, 45, 12, 35, 10, 17, 20, 51, 18, 5, 7, 19, 29, 57, 10, 59, 31, 9, 32, 15, 22, 65, 34, 23, 14, 69, 8, 71, 37, 25, 38
Offset: 2
Examples
Write x#y if x|y is false; then 7#65, 6#68, 5#73, 4|80, so a(8) = 4. For n = 11, A110357(11) = 110 and a(11) = H(11, 110) - 11 = 20 - 11 = 9. - _Bob Andriesse_, Jan 03 2023
Links
- Clark Kimberling, Table of n, a(n) for n = 2..1000
Programs
-
Mathematica
Table[m = 1; While[! Divisible[n^2+m^2,n-m], m++]; m, {n, 2, 100}]
-
PARI
a(n) = my(m=1); while(denominator((n^2+m^2)/(n-m)) != 1, m++); m; \\ Michel Marcus, Aug 16 2019
-
Python
from sympy.abc import x, y from sympy.solvers.diophantine.diophantine import diop_quadratic def A214750(n): return min(int(x) for x,y in diop_quadratic(n*(n-y)+x*(y+x)) if x>0) # Chai Wah Wu, Oct 06 2023
Formula
a(n) = H(n, A110357(n)) - n where H is the harmonic mean. - Bob Andriesse, Jan 03 2023
Comments