OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..3569
Math Overflow, Sum of reciprocals of integers minus primes.
EXAMPLE
Sum_{primes p < 6} 1/(6-p) = 1/(6-2) + 1/(6-3) + 1/(6-5) = 19/12 so a(6) = 19.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Robert Israel, Jun 08 2018
STATUS
approved