|
|
A333196
|
|
Least k such that Sum_{i=1..n} k^n / i is a positive integer.
|
|
3
|
|
|
1, 2, 6, 6, 30, 10, 70, 70, 210, 210, 2310, 2310, 30030, 30030, 30030, 30030, 510510, 510510, 9699690, 1939938, 646646, 646646, 14872858, 44618574, 223092870, 223092870, 223092870, 223092870, 6469693230, 6469693230, 200560490130, 200560490130, 18232771830
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Least k > 0 such that k^n/A002805(n) is an integer.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 6, the denominator of Sum_{i=1..6} 1/i is 20 = 2^2*5, so a(7) = 2*5 = 10.
|
|
PROG
|
(PARI) a(n) = factorback(factorint(denominator(sum(i=2, n, 1/i)))[, 1]);
(Python)
from functools import reduce
from operator import mul
from sympy import harmonic, factorint
fs = factorint(harmonic(n).q)
return 1 if len(fs) == 0 else reduce(mul, (p**(fs[p]//n + 1 if fs[p] % n else fs[p]//n) for p in fs)) # Chai Wah Wu, Apr 03 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|