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.

A185399 As p runs through the primes, sequence gives denominator of Sum_{k=1..p-1} 1/k.

Original entry on oeis.org

1, 2, 12, 20, 2520, 27720, 720720, 4084080, 5173168, 80313433200, 2329089562800, 13127595717600, 485721041551200, 2844937529085600, 1345655451257488800, 3099044504245996706400, 54749786241679275146400, 3230237388259077233637600
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2012

Keywords

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 22-23.

Crossrefs

Cf. A001008, A002805 (numerators and denominators of harmonic numbers).

Programs

  • Magma
    [Denominator(HarmonicNumber(NthPrime(n)-1)): n in [1..40]]; // Vincenzo Librandi, Dec 05 2018
  • Maple
    f2:=proc(n) local p;
    p:=ithprime(n);
    denom(add(1/i,i=1..p-1));
    end proc;
    [seq(f2(n),n=1..20)];
  • Mathematica
    nn = 20; sm = 0; t = Table[sm = sm + 1/k; Denominator[sm], {k, Prime[nn]}]; Table[t[[p - 1]], {p, Prime[Range[nn]]}] (* T. D. Noe, Apr 23 2013 *)
  • PARI
    a(n) = denominator(sum(k=1, prime(n)-1, 1/k)); \\ Michel Marcus, Dec 05 2018
    

Formula

a(n) = denominator(sum((k+1)/(p-k-1), k=0..p-2)), where p = the n-th prime. - Gary Detlefs, Jan 12 2012
a(n) = numerator(H(p)/H(p-1)) - denominator(H(p)/H(p-1)), where p is the n-th prime and H(n) is the n-th harmonic number. - Gary Detlefs, Apr 21 2013