login
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).
1
1, 3, 61, 509, 8431, 118623, 36093, 375035183, 9682292227, 40030624861, 1236275063173, 46600968591317, 2690511212793403, 5006621632408586951, 73077117446662772669, 4062642402613316532391, 139715526178793824689891
OFFSET
3,2
LINKS
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.
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 *)
PROG
(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
(Magma) [Numerator((NthPrime(n)-1)*HarmonicNumber(NthPrime(n)-1)/NthPrime(n)^2): n in [3..25]]; // G. C. Greubel, Sep 02 2018
CROSSREFS
KEYWORD
frac,nonn
AUTHOR
Alexander Adamchuk, Jul 16 2006
STATUS
approved