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.

A006450 Prime-indexed primes: primes with prime subscripts.

Original entry on oeis.org

3, 5, 11, 17, 31, 41, 59, 67, 83, 109, 127, 157, 179, 191, 211, 241, 277, 283, 331, 353, 367, 401, 431, 461, 509, 547, 563, 587, 599, 617, 709, 739, 773, 797, 859, 877, 919, 967, 991, 1031, 1063, 1087, 1153, 1171, 1201, 1217, 1297, 1409, 1433, 1447, 1471
Offset: 1

Views

Author

Jeffrey Shallit, Nov 25 1975

Keywords

Comments

Subsequence of A175247 (primes (A000040) with noncomposite (A008578) subscripts), a(n) = A175247(n+1). - Jaroslav Krizek, Mar 13 2010
Primes p such that p and pi(p) are both primes. - Juri-Stepan Gerasimov, Jul 14 2011
Sum_{n>=1} 1/a(n) converges. In fact, Sum_{n>N} 1/a(n) < 1/log(N), by the integral test. - Jonathan Sondow, Jul 11 2012
The number of such primes not exceeding x > 0 is pi(pi(x)). I conjecture that the sequence a(n)^(1/n) (n = 1,2,3,...) is strictly decreasing. This is an analog of the Firoozbakht conjecture on primes. - Zhi-Wei Sun, Aug 17 2015
Limit_{n->infinity} a(n)/(n*(log(n))^2) = 1. Proof: By Cipolla's asymptotic formula, prime(n) ~ L(n) + R(n), where L(n)/n = log(n) + log(log(n)) - 1 and R(n)/n decreases logarithmically to 0. Hence, for large n, a(n) = prime(prime(n)) ~ L(L(n)+R(n)) + R(L(n)+R(n)) = n*(log(n))^2 + r(n), where r(n) grows as O(n*log(n)*log(log(n))). The rest of the proof is trivial. The convergence is very slow: for k = 1,2,3,4,5,6, sqrt(a(10^k)/10^k)/log(10^k) evaluates to 2.055, 1.844, 1.695, 1.611, 1.545, and 1.493, respectively. - Stanislav Sykora, Dec 09 2015

Examples

			a(5) = 31 because a(5) = p(p(5)) = p(11) = 31.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Primes for which A049076 > 1.
Cf. A185723 and A214296 for numbers and primes that are sums of distinct a(n); cf. A213356 and A185724 for those that are not.
Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270795, A270796, A102616.

Programs

  • Haskell
    a006450 = a000040 . a000040
    a006450_list = map a000040 a000040_list
    -- Reinhard Zumkeller, Jan 12 2013
    
  • Magma
    [ NthPrime(NthPrime(n)): n in [1..51] ]; // Jason Kimberley, Apr 02 2010
    
  • Maple
    seq(ithprime(ithprime(i)),i=1..50); # Uli Baum (Uli_Baum(AT)gmx.de), Sep 05 2007
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622. - N. J. A. Sloane, Mar 30 2016
  • Mathematica
    Table[ Prime[ Prime[ n ] ], {n, 100} ]
  • PARI
    i=0;forprime(p=2,1e4,if(isprime(i++),print1(p", "))) \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    a=vector(10^3,n,prime(prime(n))) \\ Stanislav Sykora, Dec 09 2015
    
  • Python
    from sympy import prime
    def a(n): return prime(prime(n))
    print([a(n) for n in range(1, 52)]) # Michael S. Branicky, Aug 11 2021
    
  • Python
    # much faster version for initial segment of sequence
    from sympy import nextprime, isprime
    def aupton(terms):
        alst, p, pi = [], 2, 1
        while len(alst) < terms:
            if isprime(pi): alst.append(p)
            p, pi = nextprime(p), pi+1
        return alst
    print(aupton(10000)) # Michael S. Branicky, Aug 11 2021

Formula

a(n) = prime(prime(n)) = A000040(A000040(n)). - Juri-Stepan Gerasimov, Sep 24 2009
a(n) > n*(log(n))^2, as prime(n) > n*log(n) by Rosser's theorem. - Jonathan Sondow, Jul 11 2012
a(n)/log(a(n)) ~ prime(n). - Thomas Ordowski, Mar 30 2015
Sum_{n>=1} 1/a(n) is in the interval (1.04299, 1.04365) (Bayless et al., 2013). - Amiram Eldar, Oct 15 2020

A213356 Numbers that are not the sum of distinct primes with prime subscripts.

Original entry on oeis.org

1, 2, 4, 6, 7, 9, 10, 12, 13, 15, 18, 21, 23, 24, 26, 27, 29, 30, 32, 35, 37, 38, 40, 43, 54, 65, 68, 71, 82, 85, 96
Offset: 1

Views

Author

Jonathan Sondow, Jul 10 2012

Keywords

Comments

Same as numbers <= 96 that are not the sum of distinct primes 3, 5, 11, 17, 31, 41, 59, 67, 83 (= terms of A006450 <= 96), because Dressler and Parker prove that every integer > 96 is a sum of distinct terms of A006450 (primes with prime subscripts).

Examples

			Prime(Prime(1)) = Prime(2) = 3 and Prime(Prime(2)) = Prime(3) = 5, so 1, 2, and 4 are members, but 3, 5, and 3+5=8 are not.
		

Crossrefs

Cf. A006450, A185723 (complement), A185724, A214296.

A185724 Primes that are not the sum of distinct primes with prime subscripts.

Original entry on oeis.org

2, 7, 13, 23, 29, 37, 43, 71
Offset: 1

Views

Author

Jonathan Sondow, Jul 10 2012

Keywords

Comments

Same as primes in A213356.
Same as primes < 96 that are not the sum of distinct primes 3, 5, 11, 17, 31, 41, 59, 67, 83 (= terms of A006450 < 96), because Dressler and Parker prove that every integer > 96 is a sum of distinct terms of A006450 (primes with prime subscripts).

Examples

			Prime(Prime(1)) = Prime(2) = 3 and Prime(Prime(2)) = Prime(3) = 5 and Prime(Prime(3)) = Prime(5) = 11, so 2 and 7 are members.
		

Crossrefs

A214296 Primes that are the sum of distinct primes with prime subscripts.

Original entry on oeis.org

3, 5, 11, 17, 19, 31, 41, 47, 53, 59, 61, 67, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311
Offset: 1

Views

Author

Jonathan Sondow, Jul 10 2012

Keywords

Comments

Same as primes in A185723.
Contains all primes > 96 because Dressler and Parker proved that every integer > 96 is a sum of distinct terms of A006450 (primes with prime subscripts).

Examples

			Prime(Prime(1)) = Prime(2) = 3 is a member.
Since Prime(Prime(1)) + Prime(Prime(2)) + Prime(Prime(3)) = Prime(2) + Prime(3) + Prime(5) = 3 + 5 + 11 = 19 is prime, it is also a member.
		

References

  • R. E. Dressler and S. T. Parker, Primes with a prime subscript, J. ACM, 22 (1975), 380-381.

Crossrefs

Showing 1-4 of 4 results.