A214749 Least m > 0 such that n - m divides n^2 + m.
1, 1, 2, 2, 3, 3, 2, 3, 5, 5, 6, 6, 4, 3, 8, 8, 9, 9, 5, 7, 11, 11, 4, 12, 8, 6, 14, 14, 15, 15, 8, 11, 17, 5, 18, 18, 12, 9, 20, 20, 21, 21, 8, 15, 23, 23, 6, 14, 16, 12, 26, 26, 9, 11, 14, 19, 29, 29, 30, 30, 20, 7, 12, 10, 33, 33, 17, 23, 35, 35, 36, 36, 24, 15, 32, 11
Offset: 2
Examples
Write x#y if x|y is false; then 6#50, 5#51, 4|52, so a(7) = 3.
Links
- Clark Kimberling, Table of n, a(n) for n = 2..1000
Crossrefs
Cf. A214750.
Programs
-
Mathematica
Table[m = 1; While[! Divisible[n^2+m,n-m], m++]; m, {n, 2, 100}]
-
PARI
a(n) = my(m=1); while((n^2+m) % (n-m), m++); m; \\ Michel Marcus, Sep 04 2023
-
Python
from sympy.abc import x, y from sympy.solvers.diophantine.diophantine import diop_quadratic def A214749(n): return min(int(x) for x,y in diop_quadratic(n*(n-y)+x*(y+1)) if x>0) # Chai Wah Wu, Oct 06 2023
Comments