login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A085343 Number of primes between sigma(n) and phi(n). 4
0, 2, 1, 3, 1, 4, 1, 4, 3, 5, 1, 7, 1, 6, 5, 7, 1, 9, 1, 9, 6, 7, 1, 13, 3, 8, 5, 11, 1, 16, 1, 12, 7, 10, 6, 19, 1, 10, 7, 18, 1, 19, 1, 15, 12, 12, 1, 24, 3, 16, 9, 16, 1, 23, 8, 21, 11, 15, 1, 33, 1, 14, 16, 20, 8, 26, 1, 19, 10, 25, 1, 35, 1, 19, 18, 23, 7, 30, 1, 31, 14, 18, 1, 39, 10, 19 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(p) = 1 for prime p > 2. Since phi(p) = p - 1 and sigma(p) = p + 1, the largest prime q < p - 1 must be the prime previous to p, while p itself is the largest prime less than p + 1 for p > 2. - Michael De Vlieger, Jan 22 2020
LINKS
FORMULA
a(n) = Pi(sigma(n)) - Pi(phi(n)) = A000720(A000203(n)) - A000720(A000010(n)).
a(n) = A070803(n) - A070804(n). - Antti Karttunen, Jan 22 2020
EXAMPLE
n=12: sigma(12)=28, phi(n)=4, Pi(28)-Pi(4)=9-2=7.
MATHEMATICA
Array[Subtract @@ PrimePi@{DivisorSigma[1, #], EulerPhi@ #} &, 86] (* Michael De Vlieger, Jan 22 2020 *)
PROG
(PARI) a(n) = primepi(sigma(n)) - primepi(eulerphi(n)); \\ Michel Marcus, Aug 29 2019
CROSSREFS
Sequence in context: A097019 A262999 A324933 * A049077 A180184 A330752
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 10 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:49 EDT 2024. Contains 371936 sequences. (Running on oeis4.)