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-4 of 4 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).

A074398 Number of primes between n and phi(n), with neither n nor phi(n) included in the count in case they are primes.

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Sep 24 2002

Keywords

Examples

			phi(6) = 2 and there are 2 primes between 2 and 6 (endpoints are excluded), namely 3, 5. Hence a(6) = 2.
		

Crossrefs

Programs

  • 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[n, EulerPhi[n]], {n, 1, 100}]
    (* Second program: *)
    Array[PrimePi@ # - PrimePi@ EulerPhi@ # - Boole@ PrimeQ@ # &, 96] (* or *) Array[Count[Range[EulerPhi@ # + 1, # - 1], ?PrimeQ] &, 96] (* _Michael De Vlieger, Dec 16 2017 *)
  • PARI
    A074398(n) = (primepi(n) - primepi(eulerphi(n)) - isprime(n)); \\ Antti Karttunen, Dec 16 2017

Formula

a(n) = A085342(n) - A010051(n) = A000720(n) - A000720(A000010(n)) - A010051(n). - Antti Karttunen, Dec 16 2017

Extensions

Name clarified by Antti Karttunen, Dec 16 2017

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}

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-4 of 4 results.