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.

A120285 Numerator of harmonic number H(p-1) = Sum_{k=1..p-1} 1/k for prime p.

Original entry on oeis.org

1, 3, 25, 49, 7381, 86021, 2436559, 14274301, 19093197, 315404588903, 9304682830147, 54801925434709, 2078178381193813, 12309312989335019, 5943339269060627227, 14063600165435720745359, 254381445831833111660789
Offset: 1

Views

Author

Alexander Adamchuk, Jul 07 2006

Keywords

Comments

Prime(n)^2 divides a(n) for n>2.

References

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

Crossrefs

Programs

  • Maple
    f3:=proc(n) local p;
    p:=ithprime(n);
    numer(add(1/i,i=1..p-1));
    end proc;
    [seq(f3(n),n=1..20)];
  • Mathematica
    Numerator[Table[Sum[1/k,{k,1,Prime[n]-1}],{n,1,20}]]
    Table[HarmonicNumber[p],{p,Prime[Range[20]]-1}]//Numerator (* Harvey P. Dale, May 18 2023 *)
  • PARI
    a(n) = my(p=prime(n)); numerator(sum(k=1, p-1, 1/k)); \\ Michel Marcus, Dec 25 2018

Formula

a(n) = numerator(Sum_{k=1..prime(n)-1} 1/k).
a(n) = A001008(prime(n)-1).
a(n) = A061002(n)*prime(n)^2 for n > 2.