cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-6 of 6 results.

A085341 Number of primes between sigma(n) and n inclusive.

Original entry on oeis.org

0, 1, 0, 2, 0, 2, 0, 2, 2, 3, 0, 4, 0, 3, 3, 5, 0, 5, 0, 5, 3, 3, 0, 8, 2, 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, 13, 5, 16, 0, 11, 5, 15, 0, 24, 0, 9, 9, 13, 3, 18, 0, 20, 8
Offset: 1

Views

Author

Labos Elemer, Jul 10 2003

Keywords

Examples

			n = 12: sigma(n) = 28, pi(28) - pi(12) = 9 - 5 = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[DivisorSigma[1,n]]-PrimePi[n],{n,90}] (* Harvey P. Dale, Aug 18 2015 *)
  • PARI
    a(n) = primepi(sigma(n)) - primepi(n); \\ Michel Marcus, Dec 15 2013

Formula

a(n) = pi(sigma(n)) - pi(n) = A000720(A000203(n)) - A000720(n).

A085342 Number of primes between phi(n) and n, where n is included in the count if it is a prime, while phi(n) is never included in the count even if it is a prime.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 2, 2, 1, 4, 1, 4, 3, 4, 1, 5, 1, 4, 2, 4, 1, 6, 1, 5, 3, 5, 2, 6, 1, 5, 3, 6, 1, 8, 1, 6, 5, 6, 1, 9, 2, 7, 4, 6, 1, 9, 4, 7, 5, 7, 1, 11, 1, 8, 7, 7, 3, 10, 1, 8, 5, 10, 1, 11, 1, 10, 9, 10, 4, 12, 1, 11, 6, 10, 1, 14, 5, 10, 7, 11, 1, 15, 4, 10, 7, 10, 4, 13, 1
Offset: 1

Views

Author

Labos Elemer, Jul 10 2003

Keywords

Comments

Number of primes in (phi(n), n]. - Charles R Greathouse IV, Dec 26 2013

Examples

			n=12: phi(n)=4, pi(12)-pi(4)=5-2=3.
		

Crossrefs

Programs

  • Mathematica
    Array[PrimePi[#] - PrimePi@ EulerPhi@ # &, 97] (* Michael De Vlieger, Dec 16 2017 *)
  • PARI
    a(n) = primepi(n) - primepi(eulerphi(n)); \\ Michel Marcus, Dec 26 2013

Formula

a(n) = pi(n) - pi(phi(n)) = A000720(n) - A000720(A000010(n)).
a(n) = A074398(n) + A010051(n). - Antti Karttunen, Dec 16 2017

Extensions

Name clarified by Antti Karttunen, Dec 16 2017

A085343 Number of primes between sigma(n) and phi(n) inclusive.

Original entry on oeis.org

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
Offset: 1

Views

Author

Labos Elemer, Jul 10 2003

Keywords

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

Examples

			n=12: sigma(12)=28, phi(n)=4, Pi(28)-Pi(4)=9-2=7.
		

Crossrefs

Programs

  • Mathematica
    Array[Subtract @@ PrimePi@{DivisorSigma[1, #], EulerPhi@ #} &, 86] (* Michael De Vlieger, Jan 22 2020 *)
  • PARI
    a(n) = primepi(sigma(n)) - primepi(eulerphi(n)); \\ Michel Marcus, Aug 29 2019

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

A085345 Least number x such that number of primes between phi(x) and x equals n.

Original entry on oeis.org

2, 6, 12, 18, 24, 30, 50, 42, 48, 66, 60, 78, 96, 84, 90, 130, 108, 176, 114, 132, 156, 182, 150, 168, 186, 180, 216, 198, 228, 429, 210, 258, 308, 240, 276, 282, 270, 306, 294, 300, 354, 366, 336, 330, 384, 378, 396, 360, 432, 438, 622, 444, 390, 490, 474, 498
Offset: 1

Views

Author

Labos Elemer, Jul 10 2003

Keywords

Crossrefs

Programs

  • Maple
    N:= 200: # for a(1)..a(N)
    V:= Vector(N):
    count:= 0:
    for x from 1 while count < N do
      v:= numtheory:-pi(x) - numtheory:-pi(numtheory:-phi(x));
      if v >= 1 and v <= N and V[v] = 0 then
        V[v]:= x; count:= count+1;
      fi
    od:
    convert(V,list); # Robert Israel, Aug 23 2018

Formula

a(n)=Min{x; A085342(x)=n}

A085346 Least number x so that number of primes between sigma(x) and phi(x) equals n.

Original entry on oeis.org

3, 2, 4, 6, 10, 14, 12, 26, 18, 34, 28, 32, 24, 62, 44, 30, 123, 40, 36, 64, 56, 106, 54, 48, 70, 66, 146, 105, 88, 78, 80, 135, 60, 178, 72, 102, 202, 112, 84, 164, 114, 90, 96, 154, 695, 231, 138, 108, 184, 1141, 176, 140, 126, 244, 132, 160, 326, 232, 186, 208, 120
Offset: 1

Views

Author

Labos Elemer, Jul 10 2003

Keywords

Crossrefs

Programs

  • PARI
    s(n) = my(f = factor(n)); primepi(sigma(f)) - primepi(eulerphi(f));
    list(len) = {my(v = vector(len), k = 1, c = 0, i); while(c < len, i = s(k); if(i > 0 && i <= len && v[i] == 0, c++; v[i] = k); k++); v;} \\ Amiram Eldar, Dec 20 2024

Formula

a(n) = Min{x; A085343(x) = n}.

A085344 Least number x such that number of primes between sigma(x) and x equals n.

Original entry on oeis.org

2, 4, 10, 12, 16, 46, 28, 24, 44, 30, 42, 40, 36, 54, 48, 66, 178, 78, 104, 80, 102, 60, 128, 72, 84, 152, 90, 138, 255, 96, 108, 174, 140, 126, 132, 266, 160, 150, 248, 222, 156, 120, 246, 200, 144, 198, 634, 224, 220, 204, 370, 260, 168, 376, 555, 430, 354, 308
Offset: 1

Views

Author

Labos Elemer, Jul 10 2003

Keywords

Crossrefs

Programs

  • Mathematica
    m = 100; seq = Table[0, {m}]; c = 0; n = 0; While[c < m, n++; i = PrimePi[ DivisorSigma[1, n]] - PrimePi[n]; If[i <= m && seq[[i]] == 0, c++; seq[[i]] = n]]; seq (* Amiram Eldar, Mar 01 2020 *)
  • PARI
    a(n) = {my(x=1); while (primepi(sigma(x)) - primepi(x) != n, x++); x;} \\ Michel Marcus, Mar 01 2020

Formula

a(n) = Min{x; A085341(x)=n}.
Showing 1-6 of 6 results.