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

A070802 a(n)=prevprime[sigma(n)]-nextprime[phi(n)]=A070801(n)-A070800(n).

Original entry on oeis.org

1, 0, 4, 0, 8, 0, 8, 6, 12, 0, 18, 0, 16, 12, 20, 0, 30, 0, 30, 18, 20, 0, 48, 8, 28, 18, 40, 0, 60, 0, 44, 24, 36, 18, 76, 0, 40, 24, 72, 0, 76, 0, 60, 44, 48, 0, 96, 10, 66, 34, 68, 0, 94, 30, 84, 42, 60, 0, 150, 0, 58, 66, 90, 30, 116, 0, 76, 42, 110, 0, 164, 0, 76, 72, 102, 28
Offset: 2

Views

Author

Labos Elemer, May 08 2002

Keywords

Examples

			n=100:sigma[100]=217,prevprime[217]=211, phi[100]=40,nextprime[40]=41,a(100)=211-41=170. The difference is 0 for odd primes.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[PrimePi[DivisorSigma[1, w]]]- Prime[1+PrimePi[EulerPhi[w]]], {w, 2, 128}]

Formula

a(n)=p[Pi(sigma[n])]-p[1+Pi(phi[n])]

A070804 Number of primes not exceeding phi(n).

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 3, 2, 3, 2, 4, 2, 5, 3, 4, 4, 6, 3, 7, 4, 5, 4, 8, 4, 8, 5, 7, 5, 9, 4, 10, 6, 8, 6, 9, 5, 11, 7, 9, 6, 12, 5, 13, 8, 9, 8, 14, 6, 13, 8, 11, 9, 15, 7, 12, 9, 11, 9, 16, 6, 17, 10, 11, 11, 15, 8, 18, 11, 14, 9, 19, 9, 20, 11, 12, 11, 17, 9, 21, 11, 16, 12, 22, 9, 18, 13, 16
Offset: 1

Views

Author

Labos Elemer, May 08 2002

Keywords

Examples

			n=50: phi[50]=20,Pi[20]=8=a(50)
		

Crossrefs

Programs

  • Magma
    [#PrimesUpTo(EulerPhi(n)): n in [1..90]]; // Vincenzo Librandi, Mar 26 2017
  • Mathematica
    Table[PrimePi[EulerPhi[n]], {n, 1, 256}]

Formula

a(n) = A000720(A000010(n)) = pi(phi(n)).

A070803 Number of primes not exceeding sum of divisors of n.

Original entry on oeis.org

0, 2, 2, 4, 3, 5, 4, 6, 6, 7, 5, 9, 6, 9, 9, 11, 7, 12, 8, 13, 11, 11, 9, 17, 11, 13, 12, 16, 10, 20, 11, 18, 15, 16, 15, 24, 12, 17, 16, 24, 13, 24, 14, 23, 21, 20, 15, 30, 16, 24, 20, 25, 16, 30, 20, 30, 22, 24, 17, 39, 18, 24, 27, 31, 23, 34, 19, 30, 24, 34, 20, 44, 21, 30, 30
Offset: 1

Views

Author

Labos Elemer, May 08 2002

Keywords

Examples

			n=50: sigma(50) = 93, pi(93) = 24 = a(50).
		

Crossrefs

Programs

  • Magma
    [#PrimesUpTo(SumOfDivisors(n)): n in [1..100]]; // Vincenzo Librandi, Feb 06 2017
  • Mathematica
    Table[PrimePi[DivisorSigma[1, n]], {n, 1, 256}]
  • PARI
    A070803(n) = primepi(sigma(n)) \\ Michael B. Porter, Jan 28 2010
    
  • Sage
    [prime_pi(sigma(n,1)) for n in range(1, 76)] # - Zerinvary Lajos, Jun 06 2009
    

Formula

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

A070801 Largest prime <= sigma(n): a(n) = prevprime(sigma(n)), where prevprime(n) = A007917(n), the largest prime less than or equal to n.

Original entry on oeis.org

3, 3, 7, 5, 11, 7, 13, 13, 17, 11, 23, 13, 23, 23, 31, 17, 37, 19, 41, 31, 31, 23, 59, 31, 41, 37, 53, 29, 71, 31, 61, 47, 53, 47, 89, 37, 59, 53, 89, 41, 89, 43, 83, 73, 71, 47, 113, 53, 89, 71, 97, 53, 113, 71, 113, 79, 89, 59, 167, 61, 89, 103, 127, 83, 139, 67, 113, 89
Offset: 2

Views

Author

Labos Elemer, May 08 2002

Keywords

Comments

Largest integer k such that A000203(k) <= A000203(n)+1. - Antti Karttunen, Nov 07 2017, after Benoit Cloitre's Mar 17 2002 comment in A007917.

Examples

			For n=100: sigma(100) = 217, prevprime(217) = 211 = a(100).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[PrimePi[DivisorSigma[1, w]]], {w, 2, 128}]
    Table[NextPrime[DivisorSigma[1, n] + 1, -1], {n, 2, 128}] (* Amiram Eldar, Mar 01 2024 *)
  • PARI
    A070801(n) = precprime(sigma(n)); \\ Antti Karttunen, Nov 07 2017
    
  • Scheme
    (define (A070801 n) (let ((s1 (+ 1 (A000203 n)))) (let loop ((k s1)) (if (<= (A000203 k) s1) k (loop (- k 1)))))) ;; (For code of A000203, see under that entry). Antti Karttunen, Nov 07 2017

Formula

a(n) = A000040(A000720(sigma(n))) = A007917(A000203(n)).
From Reinhard Zumkeller, Jun 26 2003: (Start)
A085379(n) <= a(n).
a(A085380(n)) = A085379(A085380(n)).
a(A085381(n)) > A085379(A085381(n)).
a(A023194(n)) = A000203(A023194(n)). (End)

A078773 a(n) is the largest prime less than or equal to phi(n), a(1) = a(2) = 0.

Original entry on oeis.org

0, 0, 2, 2, 3, 2, 5, 3, 5, 3, 7, 3, 11, 5, 7, 7, 13, 5, 17, 7, 11, 7, 19, 7, 19, 11, 17, 11, 23, 7, 29, 13, 19, 13, 23, 11, 31, 17, 23, 13, 37, 11, 41, 19, 23, 19, 43, 13, 41, 19, 31, 23, 47, 17, 37, 23, 31, 23, 53, 13, 59, 29, 31, 31, 47, 19, 61, 31, 43, 23, 67, 23, 71, 31, 37, 31
Offset: 1

Views

Author

Jon Perry, Jan 09 2003

Keywords

Comments

The original name was: "Prime preceding phi(n)". However, this is true only for n >= 7 from which onward phi(n) is guaranteed to get only composite values. For n = 3, 4 and 6 for which phi(n) = 2, a(n) = 2 also.

Examples

			phi(10)=4, hence a(10)=3.
		

Crossrefs

Programs

  • Mathematica
    If[#<0,0,#]&/@Table[NextPrime[EulerPhi[n]+1,-1],{n,80}] (* Harvey P. Dale, Aug 10 2012 *)
  • PARI
    for (n=1,100, print1(precprime(eulerphi(n))","))

Formula

a(1) = a(2) = 0 (by convention), and for n >= 3, a(n) = A007917(A000010(n)). - Antti Karttunen, Dec 05 2017

Extensions

Name changed by Antti Karttunen, Dec 05 2017
Showing 1-5 of 5 results.