login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A074397
Number of primes between sigma(n) and n.
0
0, 0, 0, 1, 0, 2, 0, 2, 1, 3, 0, 4, 0, 3, 3, 4, 0, 5, 0, 5, 3, 3, 0, 8, 1, 4, 3, 7, 0, 10, 0, 7, 4, 5, 4, 13, 0, 5, 4, 12, 0, 11, 0, 9, 7, 6, 0, 15, 1, 9, 5, 10, 0, 14, 4, 14, 6, 8, 0, 22, 0, 6, 9, 12, 5, 16, 0, 11, 5, 15, 0, 24, 0, 9, 9, 13, 3, 18, 0, 20, 8, 8, 0, 25, 5, 9, 7, 18, 0, 27, 5, 15, 7
OFFSET
1,6
EXAMPLE
sigma(6) = 12 and there are 2 primes between 6 and 12 (endpoints are excluded), namely 7, 11. Hence a(6) = 2.
MATHEMATICA
(*gives number of primes < n*) f[n_] := Module[{r, i}, r = 0; i = 1; While[Prime[i] < n, i++ ]; i - 1]; (*gives number of primes between m and n with endpoints excluded*) g[m_, n_] := Module[{r}, r = f[m] - f[n]; If[PrimeQ[n], r = r - 1]; r]; Table[g[DivisorSigma[1, n], n], {n, 1, 100}]
CROSSREFS
Sequence in context: A138036 A354856 A055136 * A345039 A082023 A349438
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Sep 24 2002
STATUS
approved