A305700 a(n) is the numerator of Sum_{primes p < n} 1/(n-p).
0, 0, 1, 3, 5, 19, 19, 17, 89, 673, 47, 979, 1297, 4883, 1771, 79613, 31, 393959, 2033, 85639, 116551, 616181, 4111, 16637083, 727403, 13117673, 72631, 122771983, 194803, 31691158757, 491951, 124085749, 9079549, 114103102711, 92671, 743246297281, 213649, 197986199, 972486919, 144015774883
Offset: 1
Examples
Sum_{primes p < 6} 1/(6-p) = 1/(6-2) + 1/(6-3) + 1/(6-5) = 19/12 so a(6) = 19.
Links
- Robert Israel, Table of n, a(n) for n = 1..3569
- Math Overflow, Sum of reciprocals of integers minus primes.
Crossrefs
Cf. A305702 (denominators).
Programs
-
Maple
N:= 100: # to get a(1)..a(N) P:= select(isprime, [2,seq(i,i=3..N,2)]): seq(numer(add(1/(n-p),p=select(`<`,P,n))), n=1..N);
-
Mathematica
a[n_] := Sum[1/(n-p), {p, Prime[Range[PrimePi[n-1]]]}] // Numerator; Array[a, 100] (* Jean-François Alcover, Apr 29 2019 *)
-
PARI
a(n) = my(p=select(x->isprime(x), [1..n-1])); numerator(sum(k=1, #p, 1/(n-p[k]))); \\ Michel Marcus, Jun 09 2018