OFFSET
1,2
COMMENTS
So far, all the numbers a(n) + n are squarefree.
EXAMPLE
a(1) = 0: (2*0)! / (0+1)!^2 = 1/1 = 1.
From Jon E. Schoenfield, Apr 18 2021: (Start)
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.
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.
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.
.
| Reduced fraction (2k)!/(k+2)!^2
+-------------------------------------+---------------
k | numerator | denominator
----+-------------------------------------+---------------
0 | 1 | 2^2
1 | 1 | 2 * 3^2
2 | 1 | 2^3 * 3
3 | 1 | 2^2 * 5
4 | 7 | 2 * 3^2 * 5
5 | 1 | 7
6 | 3 * 11 | 2^4 * 7
7 | 11 * 13 | 2^3 * 3^3
8 | 11 * 13 | 2 * 3^2 * 5
9 | 13 * 17 | 5 * 11
10 | 13 * 17 * 19 | 2^2 * 3^2 * 11
. | |
. | |
. | |
205 | 2^3 * 5 * 7 * 11^2 * 13 * 17 * 19^2 | 23 * 103
| * 31 * 37 * 43 * 53 * 71 * 73 * 79 |
| * 107 * ... * 131 * 211 * ... * 409 |
| |
206 | 3 * 5 * 7 * 11^2 * 17 * 19^2 * 31 | 2^3 * 13 * 23
| * 37* 43 * 53 * 71 * 73 * 79 |
| * 107 * ... * 137 * 211 * ... * 409 |
| |
207 | 3^3 * 5 * 7^2 * 17 * 31 * 37 |
| * 43 * 53 * 59 * 71 * 73 * 79 |
| * 107 * ... * 137 * 211 * ... * 409 | 2^2 * 13
| |
208 | 2 * 3 * 17 * 31 * 37 * 43 |
| * 53 * 59 * 71 * ... * 83 |
| * 107 * ... * 137 * 211 * ... * 409 | 1
.
The denominator first reaches 1 at k=208, so a(2)=208.
(End)
PROG
(PARI) f(n, k) = (2*k)! / (k+n)!^2;
isok(n, k) = denominator(f(n, k)) == 1;
a(n) = my(k=0); while (!isok(n, k), k++); k; \\ Michel Marcus, May 03 2021
(Python)
from fractions import Fraction
from sympy import factorial
def A343507(n):
k, f = 0, Fraction(1, int(factorial(n))**2)
while f.denominator != 1:
k += 1
f *= Fraction(2*k*(2*k-1), (k+n)**2)
return k # Chai Wah Wu, May 03 2021
(Python)
from math import gcd
n = 0
while n >= 0:
num, den, i, n = 1, 1, 1, n+1
while i <= n:
den, i = den*i*i, i+1
k, kk = 0, 0
while den > 1:
k, kk = k+1, kk+2
d = gcd(num, (n+k)*(n+k))*gcd(den, (kk-1)*kk)
num, den = num*(kk-1)*kk//d, den*(n+k)*(n+k)//d
print(n, k) # A.H.M. Smeets, May 03 2021
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Daniel Mizrahi, Apr 17 2021
STATUS
approved