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.

A120308 Numerator((p-1)*H(p-1))/p^2 for p = prime(n) > 3, where H(k) is k-th harmonic number A001008(k)/A002805(k).

Original entry on oeis.org

1, 3, 61, 509, 8431, 118623, 36093, 375035183, 9682292227, 40030624861, 1236275063173, 46600968591317, 2690511212793403, 5006621632408586951, 73077117446662772669, 4062642402613316532391, 139715526178793824689891
Offset: 3

Views

Author

Alexander Adamchuk, Jul 16 2006

Keywords

Crossrefs

Programs

  • Magma
    [Numerator((NthPrime(n)-1)*HarmonicNumber(NthPrime(n)-1)/NthPrime(n)^2): n in [3..25]]; // G. C. Greubel, Sep 02 2018
  • Maple
    N:= 50: # to get the first N terms
    Primes:= select(isprime,[seq(2*i+1,i=2..(ithprime(N+2)-1)/2)]):
    H:= ListTools[PartialSums]([seq(1/i,i=1..Primes[-1]-1)]):
    seq(numer((p-1)*H[p-1])/p^2, p=Primes); # Robert Israel, Sep 09 2014
  • Mathematica
    Numerator[Table[(Prime[n]-1)*(Sum[(1/k), {k, 1, Prime[n]-1}]),{n,3,20}]]/Table[Prime[n]^2,{n,3,20}]
    Table[((p-1)HarmonicNumber[p-1])/p^2,{p,Prime[Range[2,20]]}]//Numerator (* Harvey P. Dale, May 19 2021 *)
  • PARI
    {a(n) = numerator((prime(n)-1)*sum(k=1,prime(n)-1, 1/k)/prime(n)^2)};
    for(n=3,25, print1(a(n), ", ")) \\ G. C. Greubel, Sep 02 2018
    

Formula

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