%I #40 Aug 17 2024 09:02:05
%S 1,5,4,207,206,2475,984,8171,8170,45144,45143,3648830,3648829,7979077,
%T 7979076,58068862,58068861,255278295,255278294
%N Smallest k such that Product_{i=1..k} (n+i) divides Product_{i=1..k} (n+k+i), or 0 if there is no such k.
%C Erdős and Straus asked if a(n) exists for all n.
%H Thomas Bloom, <a href="https://www.erdosproblems.com/389">Problem 389</a>.
%e 3*4*5*6 ∣ 7*8*9*10, so a(2) = 4.
%o (PARI) a(n) = my(k=1); while(prod(i=1, k, n+k+i)%prod(i=1, k, n+i), k++); k;
%o (Python)
%o from itertools import count
%o def A375071(n):
%o a, b = n+1, n+2
%o for k in count(1):
%o if not b%a:
%o return k
%o a *= n+k+1
%o b = b*(n+2*k+1)*(n+2*k+2)//(n+k+1) # _Chai Wah Wu_, Aug 01 2024
%K nonn,hard,more
%O 0,2
%A _Ralf Stephan_, Jul 29 2024
%E a(10)-a(18) from _Bhavik Mehta_, Aug 16 2024