%I #29 May 07 2021 09:23:36
%S 0,208,3475,8174,252965,3648835,72286092,159329607,2935782889
%N a(n) is the smallest nonnegative integer k such that (2*k)! / (k+n)!^2 is an integer.
%C So far, all the numbers a(n) + n are squarefree.
%e a(1) = 0: (2*0)! / (0+1)!^2 = 1/1 = 1.
%e From _Jon E. Schoenfield_, Apr 18 2021: (Start)
%e Let f(n,k) = (2*k)!/(k+n)!^2. Then a(n) is the smallest nonnegative k such that f(n,k) is an integer.
%e f(n,0) = (2*0)!/(0+n)!^2 = 1/n!^2, so the fraction begins at k=0 with a value of 1/n!^2, and each time k is incremented by 1, the fraction is multiplied by (2*k)*(2*k-1) and divided by (k+n)^2. Whenever k+n is a prime p, this division will cause the reduced fraction to have p in its denominator with multiplicity 1 (since the multiplicity of p in (k+n)!^2 is 2, but its multiplicity in (2*k)! is only 1). Further multiplications by (2*k)*(2*k-1)/(k+n)^2 using successive values of k will not remove the prime factor p from the reduced fraction's denominator until k reaches p. As a result, the interval [a(n)+1, a(n)+n] can never contain a prime.
%e For n=2, the factorizations of the numerator and denominator of the reduced fraction (2k)!/(k+n)!^2 are shown in the table below for the first several values of k and for the last few through k = 208. Large blocks of consecutive primes (denoted by ellipses), each with multiplicity one, accumulate in the numerator as k gets larger.
%e .
%e | Reduced fraction (2k)!/(k+2)!^2
%e +-------------------------------------+---------------
%e k | numerator | denominator
%e ----+-------------------------------------+---------------
%e 0 | 1 | 2^2
%e 1 | 1 | 2 * 3^2
%e 2 | 1 | 2^3 * 3
%e 3 | 1 | 2^2 * 5
%e 4 | 7 | 2 * 3^2 * 5
%e 5 | 1 | 7
%e 6 | 3 * 11 | 2^4 * 7
%e 7 | 11 * 13 | 2^3 * 3^3
%e 8 | 11 * 13 | 2 * 3^2 * 5
%e 9 | 13 * 17 | 5 * 11
%e 10 | 13 * 17 * 19 | 2^2 * 3^2 * 11
%e . | |
%e . | |
%e . | |
%e 205 | 2^3 * 5 * 7 * 11^2 * 13 * 17 * 19^2 | 23 * 103
%e | * 31 * 37 * 43 * 53 * 71 * 73 * 79 |
%e | * 107 * ... * 131 * 211 * ... * 409 |
%e | |
%e 206 | 3 * 5 * 7 * 11^2 * 17 * 19^2 * 31 | 2^3 * 13 * 23
%e | * 37* 43 * 53 * 71 * 73 * 79 |
%e | * 107 * ... * 137 * 211 * ... * 409 |
%e | |
%e 207 | 3^3 * 5 * 7^2 * 17 * 31 * 37 |
%e | * 43 * 53 * 59 * 71 * 73 * 79 |
%e | * 107 * ... * 137 * 211 * ... * 409 | 2^2 * 13
%e | |
%e 208 | 2 * 3 * 17 * 31 * 37 * 43 |
%e | * 53 * 59 * 71 * ... * 83 |
%e | * 107 * ... * 137 * 211 * ... * 409 | 1
%e .
%e The denominator first reaches 1 at k=208, so a(2)=208.
%e (End)
%o (PARI) f(n, k) = (2*k)! / (k+n)!^2;
%o isok(n,k) = denominator(f(n,k)) == 1;
%o a(n) = my(k=0); while (!isok(n,k), k++); k; \\ _Michel Marcus_, May 03 2021
%o (Python)
%o from fractions import Fraction
%o from sympy import factorial
%o def A343507(n):
%o k, f = 0, Fraction(1,int(factorial(n))**2)
%o while f.denominator != 1:
%o k += 1
%o f *= Fraction(2*k*(2*k-1),(k+n)**2)
%o return k # _Chai Wah Wu_, May 03 2021
%o (Python)
%o from math import gcd
%o n = 0
%o while n >= 0:
%o num, den, i, n = 1, 1, 1, n+1
%o while i <= n:
%o den, i = den*i*i, i+1
%o k,kk = 0, 0
%o while den > 1:
%o k, kk = k+1, kk+2
%o d = gcd(num,(n+k)*(n+k))*gcd(den,(kk-1)*kk)
%o num, den = num*(kk-1)*kk//d, den*(n+k)*(n+k)//d
%o print(n,k) # _A.H.M. Smeets_, May 03 2021
%Y Cf. A001044, A010050.
%K nonn,hard,more
%O 1,2
%A _Daniel Mizrahi_, Apr 17 2021