cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A333196 Least k such that Sum_{i=1..n} k^n / i is a positive integer.

Original entry on oeis.org

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
Offset: 1

Views

Author

Jinyuan Wang, Mar 10 2020

Keywords

Comments

Least k > 0 such that k^n/A002805(n) is an integer.

Examples

			For n = 6, the denominator of Sum_{i=1..6} 1/i is 20 = 2^2*5, so a(7) = 2*5 = 10.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(i[1], i=ifactors(denom(harmonic(n)))[2]):
    seq(a(n), n=1..33);  # Alois P. Heinz, Apr 23 2025
  • 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
    def A333196(n):
        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

Formula

a(n) = A007947(A002805(n)).
Showing 1-1 of 1 results.