OFFSET
1,2
COMMENTS
Note that the denominator of (Sum_{i=1..n} (-k)^i/i) - (-k)^p/p can never be divisible by p, where n/2 < p <= n. Therefore, for the expression to be an integer, such p must divide k. Thus, a(n) = k is divisible by A055773(n).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..60
FORMULA
a(n) <= A034386(n).
PROG
(PARI) a(n) = {my(m = prod(i=primepi(n/2)+1, primepi(n), prime(i)), k = m); while(denominator(sum(i=2, n, (-k)^i/i)) != 1, k += m); k; }
(Python)
from sympy import primorial, lcm
def A333073(n):
f = 1
for i in range(1, n+1):
f = lcm(f, i)
f = int(f)
glist = []
for i in range(1, n+1):
glist.append(f//i)
m = 1 if n < 2 else primorial(n, nth=False)//primorial(n//2, nth=False)
k = m
while True:
p, ki = 0, -k
for i in range(1, n+1):
p = (p+ki*glist[i-1]) % f
ki = (-k*ki) % f
if p == 0:
return k
k += m # Chai Wah Wu, Apr 02 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 31 2020
STATUS
approved