A110357 a(n) is the least nonnegative integer of the form n*(n+k)/(n-k) with k>0.
6, 6, 12, 20, 12, 42, 24, 18, 15, 110, 20, 156, 35, 30, 48, 272, 36, 342, 30, 28, 66, 506, 40, 100, 78, 54, 70, 812, 42, 930, 96, 66, 102, 63, 45, 1332, 114, 78, 60, 1640, 56, 1806, 77, 90, 138, 2162, 80, 294, 75, 102, 117, 2756, 108, 66, 72, 114, 174, 3422, 84, 3660
Offset: 2
Keywords
Crossrefs
Cf. A214750.
Programs
-
Maple
a:=proc(n) local p: p:=proc(k) if type(n*(n+k)/(n-k),integer)=true then n*(n+k)/(n-k) else fi end; [seq(p(j),j=1..n-1)][1]: end: seq(a(n),n=2..75); # Emeric Deutsch, Jul 29 2005
-
PARI
a(n) = my(k=1); while(denominator((x=n*(n+k)/(n-k))) != 1, k++); x; \\ Michel Marcus, Aug 16 2019
-
Python
from sympy.abc import x, y from sympy.solvers.diophantine.diophantine import diop_quadratic def A110357(n): return min(int(x) for x,y in diop_quadratic(n*(n+y)-x*(n-y)) if x>0 and y>0) # Chai Wah Wu, Oct 06 2023
Extensions
Corrected and extended by Emeric Deutsch, Jul 29 2005
Comments