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
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Sep 24 2002
STATUS
approved