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.

A073799 Numbers that begin a run of consecutive integers k such that PrimePi(k) divides 2^k.

Original entry on oeis.org

2, 7, 19, 53, 131, 311, 719, 1619, 3671, 8161, 17863, 38873, 84017, 180503, 386093, 821641, 1742537, 3681131, 7754077, 16290047, 34136029, 71378569, 148948139, 310248241, 645155197, 1339484197, 2777105129, 5750079047, 11891268401, 24563311309, 50685770167, 104484802057, 215187847711
Offset: 1

Views

Author

Labos Elemer, Aug 12 2002

Keywords

Comments

It seems that each term is a bit larger than twice the previous one.
Runs have lengths 3, 4, 4, 6, 6, 2, 8, 2, 2, 6, 18, 18, 30, 8, 24, 6, 2, 18, ..., respectively.
From Chai Wah Wu, Jan 27 2020: (Start)
Theorem: a(1) = 2 and a(n) = A033844(n) for n > 1. For n > 1, the length of the n-th run is prime(2^n+1)-prime(2^n) = A051439(n)-A033844(n) = A074325(n).
Proof: Let r > 1. If p = prime(2^r), then primepi(p) = 2^r.
primepi(p-1) = 2^r - 1. Since r > 1, 2^r - 1 > 2 and odd and thus does not divide any power of 2.
In addition 2^r < p and thus divides 2^p. This means that p is a term. Let q be such that p < q < prime(2^r+1). Then primepi(q) = 2^r and divides 2^q. Since primepi(q-1) = 2^r and divides 2^(q-1), this means that q does not start a run and thus is not a term.
Let w be such that prime(2^r+1) <= w < prime(2^(r+1)). Then 2^r + 1 <= primepi(w) < 2^(r+1) and does not divide any power of 2. This means that w is not a term.
(End)

Crossrefs

Programs

  • Mathematica
    aQ[k_] := Divisible[2^k, PrimePi[k]]; s = {}; len = {}; n = 2; While[Length[s] < 10, While[! aQ[n], n++]; n1 = n; While[aQ[n], n++]; If[n > n1, AppendTo[s, n1]; AppendTo[len, n - n1]]; n++]; s (* Amiram Eldar, Dec 11 2018 *)
  • PARI
    a(n) = if(n==1, 2, prime(2^n)); \\ Jinyuan Wang, Mar 01 2020
  • Python
    from sympy import prime
    def A073799(n):
        return 2 if n == 1 else prime(2**n) # Chai Wah Wu, Jan 27 2020
    

Formula

Solutions to 2^(x-1) mod PrimePi(x-1) > 0 but 2^x mod PrimePi(x) = 0.
a(n) = A033844(n) for n > 1. - Chai Wah Wu, Jan 27 2020

Extensions

Edited by Jon E. Schoenfield, Dec 10 2018
a(15)-a(18) from Amiram Eldar, Dec 11 2018
a(19)-a(33) from Chai Wah Wu, Jan 27 2020

A074327 Smaller of twin primes arising in A074326.

Original entry on oeis.org

3, 311, 1619, 3671, 1742537, 148948139, 2777105129, 16149760533341, 10082409897709157
Offset: 1

Views

Author

Labos Elemer, Aug 21 2002

Keywords

Examples

			8th term in A074326 is 39, so prime[549755813888]=16149760533341=a(8) and 16149760533343 is the larger twin.
		

Crossrefs

Programs

  • Mathematica
    s=0; Do[s=Prime[1+2^n]-Prime[2^n]; If[s==2, Print[Prime[2^n]]], {n, 1, 40}]

Formula

a(n) = prime(m) where m=2^x and prime(m+1)-prime(m) = 2.
a(n) = A033844(A074326(n)). - Michel Marcus, Aug 28 2019

Extensions

Corrected and extended by Michel Marcus, Aug 28 2019

A074382 Difference between (1+3^n)-th and (3^n)-th primes.

Original entry on oeis.org

1, 2, 6, 4, 2, 6, 2, 12, 12, 12, 30, 18, 24, 10, 14, 32, 22, 12, 14, 10, 6, 12, 30, 44, 40, 54, 28, 8, 24, 26, 6, 8, 28, 48, 12, 158, 20
Offset: 0

Views

Author

Labos Elemer, Aug 22 2002

Keywords

Examples

			n=25: a(25)=54 because the 847288609443rd prime is 25270000074757 and the 847288609444th prime is 25270000074811.
		

Crossrefs

Programs

  • Mathematica
    NextPrime[#]-#&/@Table[Prime[3^n],{n,25}] (* Harvey P. Dale, Sep 29 2015 *)

Formula

a(n) = prime(1+3^n) - prime(3^n).

Extensions

Corrected by Harvey P. Dale, Sep 29 2015
a(0), a(26)-a(36) from Chai Wah Wu, Aug 30 2019

A074383 Difference between (1+10^n)-th and (10^n)-th primes.

Original entry on oeis.org

1, 2, 6, 8, 14, 12, 4, 18, 8, 24, 6, 42, 18, 48, 60, 52, 48, 8, 22, 20, 60, 38, 54, 48, 58
Offset: 0

Views

Author

Labos Elemer, Aug 22 2002

Keywords

Examples

			a(18)=22 because the (10^18)th prime is 44211790234832169331, the (1+10^18)th prime is 44211790234832169353.
		

Crossrefs

Formula

a(n) = prime(1+10^n) - prime(10^n).
a(n) = A151800(A006988(n)) - A006988(n).

Extensions

a(19) from Max Alekseyev, May 08 2009
a(20)-a(22) from Max Alekseyev, Dec 04 2014
a(23)-a(24) from Chai Wah Wu using the terms in A006988, Sep 18 2018

A081414 Largest prime divisor of prime(2^n+1) - prime(2^n).

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, 5, 2, 3, 3, 2, 3, 2, 13, 5, 17, 2, 5, 5, 5, 2, 5, 3, 7, 2, 3, 11, 3, 3, 13, 5, 11, 2, 5, 3, 3, 5, 7, 2, 3, 3, 2, 7, 2, 5, 7, 3, 7, 37, 7, 5, 17, 7, 11, 11, 13, 3, 3, 3, 43, 43, 3, 3, 7, 3, 5, 3, 5, 11, 3, 5, 3
Offset: 0

Views

Author

Labos Elemer, Apr 02 2003

Keywords

Crossrefs

Formula

a(n) = A006530(A001223(A000079(n))) = A081412(2^n) = A006530(A074325(n)).

Extensions

Three more terms from Max Alekseyev, May 15 2009
Offset changed to 0, a(0) prepended and more terms added by Amiram Eldar, Jun 04 2024
Showing 1-5 of 5 results.