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-10 of 43 results. Next

A076243 Remainder when 3rd-order prime ppp(n) = A038580(n) is divided by n.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 4, 3, 8, 9, 5, 7, 10, 5, 7, 3, 2, 11, 17, 1, 20, 21, 11, 19, 12, 17, 14, 17, 18, 19, 18, 23, 28, 27, 11, 19, 15, 7, 2, 21, 40, 25, 31, 1, 19, 15, 9, 31, 46, 47, 10, 15, 43, 23, 14, 9, 17, 19, 18, 41, 24, 27, 50, 3, 14, 29, 13, 3, 4, 39, 21, 1, 47, 19, 31, 13, 6, 17
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    MapIndexed[Mod[#1, First@ #2] &, Nest[Prime, Range@ 79, 3]] (* Michael De Vlieger, Jul 22 2017 *)

Formula

a(n) = ppp(n) mod n = A038580(n) mod n.

A076242 Remainder when 3rd order prime A038580(n) is divided by n-th prime=A000040(n).

Original entry on oeis.org

1, 2, 1, 3, 6, 10, 5, 8, 17, 19, 27, 31, 38, 35, 28, 39, 17, 17, 10, 38, 68, 63, 13, 55, 48, 4, 74, 100, 37, 29, 47, 121, 115, 136, 105, 28, 128, 109, 159, 90, 114, 31, 151, 4, 86, 108, 81, 147, 149, 189, 185, 119, 231, 166, 88, 238, 197, 233, 64, 186, 258, 111, 128, 260
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Mod[Prime[Prime[Prime[n]]],Prime[n]],{n,70}] (* Harvey P. Dale, Sep 28 2013 *)

Formula

a(n) = Mod[A038580(n), A000040(n)]

A086749 Partial sums of A038580.

Original entry on oeis.org

5, 16, 47, 106, 233, 412, 689, 1020, 1451, 2050, 2759, 3678, 4741, 5894, 7191, 8714, 10501, 12348, 14569, 16950, 19427, 22176, 25177, 28436, 32073, 36016, 40107, 44380, 48777, 53326, 58707, 64330, 70199, 76312, 82973, 89796, 96989, 104596
Offset: 1

Views

Author

Cino Hilliard, Jul 30 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Nest[Prime,Range[45],3]] (* Harvey P. Dale, Oct 25 2011 *)
  • PARI
    f(n) = y=0; for(x=1,n,y+=prime(prime(prime(x))); print1(y","))

Extensions

Edited by N. J. A. Sloane, Apr 17 2007

A245175 Second differences of A038580.

Original entry on oeis.org

14, 8, 40, -16, 46, -44, 46, 68, -58, 100, -66, -54, 54, 82, 38, -204, 314, -214, -64, 176, -20, 6, 120, -72, -158, 34, -58, 28, 680, -590, 4, -2, 304, -386, 208, 44, -180, 146, -74, -114, 408, -458, 136, -158, 652, 340, -902, -66, 60, 42, -30, 490, -466, 228
Offset: 1

Views

Author

N. J. A. Sloane, Jul 17 2014

Keywords

Crossrefs

Cf. A038580.

Programs

  • Maple
    a:= ((f-> n-> f(n+1)-f(n))@@2)(ithprime@@3):
    seq(a(n), n=1..60);
  • Mathematica
    Differences[Nest[Prime, Range[60], 3], 2] (* Jean-François Alcover, Oct 06 2018 *)
  • PARI
    f(n) = prime(prime(prime(n)))
    a(n) = f(n+2)-2*f(n+1)+f(n)
    vector(50, n, a(n)) \\ Jens Kruse Andersen, Jul 18 2014

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

A007821 Primes p such that pi(p) is not prime.

Original entry on oeis.org

2, 7, 13, 19, 23, 29, 37, 43, 47, 53, 61, 71, 73, 79, 89, 97, 101, 103, 107, 113, 131, 137, 139, 149, 151, 163, 167, 173, 181, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 281, 293, 307, 311, 313, 317, 337, 347, 349, 359, 373
Offset: 1

Views

Author

Monte J. Zerger (mzerger(AT)cc4.adams.edu), Clark Kimberling

Keywords

Comments

Primes prime(k) such that A049076(k)=1, sorted along increasing k. - R. J. Mathar, Jan 28 2014
The complement of A006450 (primes with prime index) within the primes A000040.

References

  • C. Kimberling, Fractal sequences and interspersions, Ars Combinatoria, vol. 45 p 157 1997.

Crossrefs

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
    a007821 = a000040 . a018252
    a007821_list = map a000040 a018252_list
    -- Reinhard Zumkeller, Jan 12 2013
    
  • Maple
    A007821 := proc(n) ithprime(A018252(n)) ; end proc: # R. J. Mathar, Jul 07 2012
  • Mathematica
    Prime[ Select[ Range[75], !PrimeQ[ # ] &]] (* Robert G. Wilson v, Mar 15 2004 *)
    With[{nn=100},Pick[Prime[Range[nn]],Table[If[PrimeQ[n],0,1],{n,nn}],1]] (* Harvey P. Dale, Aug 14 2020 *)
  • PARI
    forprime(p=2, 1e3, if(!isprime(primepi(p)), print1(p, ", "))) \\ Felix Fröhlich, Aug 16 2014
    
  • Python
    from sympy import primepi
    def A007821(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-(p:=primepi(x))+primepi(p)
        return bisection(f,n,n) # Chai Wah Wu, Oct 19 2024

Formula

A137588(a(n)) = n; a(n) = A000040(A018252(n)). - Reinhard Zumkeller, Jan 28 2008
A175247 U { a(n); n > 1 } = A000040. { a(n) } = { 2 } U { primes (A000040) with composite index (A002808) }. - Jaroslav Krizek, Mar 13 2010
G.f. over nonprime powers: Sum_{k >= 1} prime(k)*x^k-prime(prime(k))*x^prime(k). - Benedict W. J. Irwin, Jun 11 2016

Extensions

Edited by M. F. Hasler, Jul 31 2015

A049078 Primes prime(k) for which A049076(k) = 2.

Original entry on oeis.org

3, 17, 41, 67, 83, 109, 157, 191, 211, 241, 283, 353, 367, 401, 461, 509, 547, 563, 587, 617, 739, 773, 797, 859, 877, 967, 991, 1031, 1087, 1171, 1201, 1217, 1409, 1433, 1447, 1471, 1499, 1597, 1621, 1669, 1723, 1741, 1823, 1913, 2027, 2063, 2081, 2099
Offset: 1

Views

Author

Keywords

Examples

			For these primes S(p) is a prime but S(S(p)) is not. E.g. S(17)=7, S(7)=4.
		

Crossrefs

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

Formula

a(n) = prime(A007821(n)). - Juri-Stepan Gerasimov, Aug 11 2008
a(n) ~ A006450(n) ~ n log^2 n. - Charles R Greathouse IV, Apr 29 2015

Extensions

Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar
Spelling/notation corrections by Charles R Greathouse IV, Mar 18 2010

A049090 Primes for which A049076 >= 4.

Original entry on oeis.org

11, 31, 127, 277, 709, 1063, 1787, 2221, 3001, 4397, 5381, 7193, 8527, 9319, 10631, 12763, 15299, 15823, 19577, 21179, 22093, 24859, 27457, 30133, 33967, 37217, 38833, 40819, 42043, 43651, 52711, 55351, 57943, 60647, 66851, 68639, 72727
Offset: 1

Views

Author

Keywords

Comments

Union of A049080, A049081, A058322, A058324, etc. - R. J. Mathar, Jul 07 2012

Crossrefs

Programs

  • Maple
    map(ithprime@@3, select(isprime, [$1..157])); # Peter Luschny, Feb 17 2014
  • Mathematica
    Nest[ Prime, Range[40], 4] (* Robert G. Wilson v, Mar 15 2004 *)
  • PARI
    list(lim)=my(v=List(),q,r,s); forprime(p=2,lim,if(isprime(q++)&&isprime(r++)&&isprime(s++),listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Feb 16 2017

Formula

a(n) = A006450(A006450(n)). - James G. Merickel, Feb 14 2010
a(n) = A000040(A038580(n)). - R. J. Mathar, Jul 07 2012
a(n) ~ n (log n)^4. - Charles R Greathouse IV, Feb 16 2017

Extensions

Name corrected by Sean A. Irvine, Jul 18 2021

A049203 Primes for which A049076(p) >= 5.

Original entry on oeis.org

31, 127, 709, 1787, 5381, 8527, 15299, 19577, 27457, 42043, 52711, 72727, 87803, 96797, 112129, 137077, 167449, 173867, 219613, 239489, 250751, 285191, 318211, 352007, 401519, 443419, 464939, 490643, 506683, 527623, 648391, 683873, 718807
Offset: 1

Views

Author

Keywords

Comments

Union of A049081, A058322, A058324-A058328, A093046, etc. - R. J. Mathar, Jul 07 2012

Crossrefs

Programs

  • Maple
    map(ithprime@@4, select(isprime, [$1..137])); # Peter Luschny, Feb 17 2014
  • Mathematica
    Nest[ Prime, Range[35], 5] (* Robert G. Wilson v, Mar 15 2004 *)
  • PARI
    list(lim)=my(v=List(),q,r,s,t); forprime(p=2,lim, if(isprime(q++) && isprime(r++) && isprime(s++) && isprime(t++), listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Feb 16 2017

Formula

a(n) = A000040(A049090(n)). - R. J. Mathar, Jul 07 2012
a(n) ~ n (log n)^5. - Charles R Greathouse IV, Feb 16 2017

Extensions

More terms from Robert G. Wilson v, Nov 10 2000
Name corrected by Sean A. Irvine, Jul 21 2021

A049202 Primes p whose order of primeness A049076(p) is >= 6.

Original entry on oeis.org

127, 709, 5381, 15299, 52711, 87803, 167449, 219613, 318211, 506683, 648391, 919913, 1128889, 1254739, 1471343, 1828669, 2269733, 2364361, 3042161, 3338989, 3509299, 4030889, 4535189, 5054303, 5823667, 6478961, 6816631
Offset: 1

Views

Author

Keywords

Comments

Union of A058322, A058324-A058328, A093046 etc.

Crossrefs

Programs

  • Maple
    map(ithprime@@4,select(isprime, [$1..137])); # Peter Luschny, Feb 17 2014
  • Mathematica
    Nest[ Prime, Range[35], 6] (* Robert G. Wilson v, Mar 15 2004 *)
  • PARI
    list(lim)=my(v=List(), q, r, s, t, u); forprime(p=2, lim, if(isprime(q++) && isprime(r++) && isprime(s++) && isprime(t++) && isprime(u++), listput(v, p))); Vec(v) \\ Charles R Greathouse IV, Feb 16 2017

Extensions

More terms from Robert G. Wilson v, Nov 10 2000
Name corrected by Sean A. Irvine, Jul 21 2021
Showing 1-10 of 43 results. Next