login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A333072
Least k such that Sum_{i=1..n} k^i / i is a positive integer.
3
1, 2, 6, 6, 30, 10, 70, 70, 210, 168, 1848, 1848, 18018, 8580, 2574, 2574, 102102, 102102, 831402, 2771340, 3233230, 587860, 43266496, 117630786, 162249360, 145088370, 145088370, 2897310, 672175920, 672175920, 18232771830, 18232771830, 44279588730, 8886561060
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
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 A333072(n):
f = 1
for i in range(1, n+1):
f = lcm(f, i)
f, glist = int(f), []
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 04 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 10 2020
STATUS
approved