login
A282501
Numerator of Sum_{i = 1..n} (if(isprime(i), 0, 1/i)).
2
1, 1, 1, 5, 5, 17, 17, 37, 119, 631, 631, 661, 661, 4807, 995, 2053, 2053, 703, 703, 3599, 3679, 41309, 41309, 42079, 214091, 2829383, 25864847, 26250947, 26250947, 26611307, 26611307, 53898289, 54553489, 938220113, 135531719, 136990319, 136990319, 2629070861
OFFSET
1,4
LINKS
EXAMPLE
For n=4 the sum is 1/1 + 0 + 0 + 1/4 = 5/4, so a(4) = 5. The sum for n=5 is the same.
MATHEMATICA
a[n_]=Sum[If[Element[k, Primes], 0, 1/k], {k, 1, n}]; Numerator /@ a /@ Range[1, 10]
Numerator[Accumulate[Table[If[PrimeQ[n], 0, 1/n], {n, 40}]]] (* Harvey P. Dale, Dec 16 2017 *)
PROG
(PARI) lista(nn) = {sr = 0; for (n=1, nn, if (!isprime(n), sr += 1/n); print1(numerator(sr), ", "); ); } \\ Michel Marcus, Feb 17 2017
CROSSREFS
Cf. A018252 (nonprime numbers), A282503 (denominators).
Sequence in context: A147206 A146852 A146237 * A147167 A146647 A146719
KEYWORD
nonn,frac
AUTHOR
Ralf Steiner, Feb 16 2017
EXTENSIONS
More terms from Michel Marcus, Feb 18 2017
STATUS
approved