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 18 results. Next

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

A114537 Dispersion of the primes (an array read by downward antidiagonals).

Original entry on oeis.org

1, 2, 4, 3, 7, 6, 5, 17, 13, 8, 11, 59, 41, 19, 9, 31, 277, 179, 67, 23, 10, 127, 1787, 1063, 331, 83, 29, 12, 709, 15299, 8527, 2221, 431, 109, 37, 14, 5381, 167449, 87803, 19577, 3001, 599, 157, 43, 15, 52711, 2269733, 1128889, 219613, 27457, 4397, 919, 191, 47
Offset: 1

Views

Author

Clark Kimberling, Dec 07 2005

Keywords

Comments

A number is prime if and only if it does not lie in Column 1. As a sequence, a permutation of the natural numbers. The fractal sequence of this dispersion is A022447 and the transposition sequence is A114538.
The dispersion of the composite numbers is given at A114577.

Examples

			Northwest corner of the Primeness array:
1   2   3    5    11     31     127       709       5381       52711        648391
4   7  17   59   277   1787   15299    167449    2269733    37139213     718064159
6  13  41  179  1063   8527   87803   1128889   17624813   326851121    7069067389
8  19  67  331  2221  19577  219613   3042161   50728129   997525853   22742734291
9  23  83  431  3001  27457  318211   4535189   77557187  1559861749   36294260117
10  29 109  599  4397  42043  506683   7474967  131807699  2724711961   64988430769
12  37 157  919  7193  72727  919913  14161729  259336153  5545806481  136395369829
14  43 191 1153  9319  96797 1254739  19734581  368345293  8012791231  200147986693
15  47 211 1297 10631 112129 1471343  23391799  440817757  9672485827  243504973489
16  53 241 1523 12763 137077 1828669  29499439  563167303 12501968177  318083817907
18  61 283 1847 15823 173867 2364361  38790341  751783477 16917026909  435748987787
20  71 353 2381 21179 239489 3338989  56011909 1107276647 25366202179  664090238153
21  73 367 2477 22093 250751 3509299  59053067 1170710369 26887732891  705555301183
22  79 401 2749 24859 285191 4030889  68425619 1367161723 31621854169  835122557939
24  89 461 3259 30133 352007 5054303  87019979 1760768239 41192432219 1099216100167
25  97 509 3637 33967 401519 5823667 101146501 2062666783 48596930311 1305164025929
26 101 547 3943 37217 443419 6478961 113256643 2323114841 55022031709 1484830174901
27 103 563 4091 38833 464939 6816631 119535373 2458721501 58379844161 1579041544637
		

References

  • Alexandrov, Lubomir. "On the nonasymptotic prime number distribution." arXiv preprint math/9811096 (1998). (See Appendix.)
  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria, 45 (1997) 157-168.

Crossrefs

Diagonal: A181441.
If the antidiagonals are read in the opposite direction we get A138947.

Programs

  • Maple
    A114537 := proc(r,c) option remember; if c = 1 then A018252(r) ; else ithprime(procname(r,c-1)) ; end if; end proc: # R. J. Mathar, Oct 22 2010
  • Mathematica
    NonPrime[n_] := FixedPoint[n + PrimePi@# + 1 &, n]; t[n_, k_] := Nest[Prime, NonPrime[n], k]; Table[ t[n - k, k], {n, 0, 9}, {k, n, 0, -1}] // Flatten
    (* or to view the table *) Table[t[n, k], {n, 0, 6}, {k, 0, 10}] // TableForm (* Robert G. Wilson v, Dec 26 2005 *)

Formula

T(r,1) = A018252(r). T(r,c) = prime(T(r,c-1)), c>1. [R. J. Mathar, Oct 22 2010]

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

A049081 Primes prime(k) for which A049076(k) = 5.

Original entry on oeis.org

31, 1787, 8527, 19577, 27457, 42043, 72727, 96797, 112129, 137077, 173867, 239489, 250751, 285191, 352007, 401519, 443419, 464939, 490643, 527623, 683873, 718807, 755387, 839483, 864013, 985151, 1021271, 1080923, 1159901, 1278779
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Extensions

More terms from Robert G. Wilson v, Dec 12 2000

A049079 Primes prime(k) for which A049076(k) = 3.

Original entry on oeis.org

5, 59, 179, 331, 431, 599, 919, 1153, 1297, 1523, 1847, 2381, 2477, 2749, 3259, 3637, 3943, 4091, 4273, 4549, 5623, 5869, 6113, 6661, 6823, 7607, 7841, 8221, 8719, 9461, 9739, 9859, 11743, 11953, 12097, 12301, 12547, 13469, 13709, 14177, 14723, 14867
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Extensions

Definition edited by Zak Seidov, Sep 15 2013

A058322 Primes for which A049076(p) = 7.

Original entry on oeis.org

127, 15299, 87803, 219613, 318211, 506683, 919913, 1254739, 1471343, 1828669, 2364361, 3338989, 3509299, 4030889, 5054303, 5823667, 6478961, 6816631, 7220981, 7807321, 10311439, 10875143, 11469013, 12838937, 13243033, 15239333, 15837299, 16827557, 18143603
Offset: 1

Views

Author

Robert G. Wilson v, Dec 12 2000

Keywords

Crossrefs

Programs

  • Maple
    A058322 := proc(n)
            ithprime(A049081(n)) ;
    end proc: # R. J. Mathar, Jul 07 2012
    # second Maple program:
    map(ithprime@@6, remove(isprime, [$1..42]))[];  # Alois P. Heinz, Mar 15 2020
  • Mathematica
    Nest[ Prime, Select[ Range[40], !PrimeQ[ # ] &], 6] (* Robert G. Wilson v, Mar 15 2004 *)

Formula

a(n) = A000040(A049081(n)).

Extensions

More terms from Alois P. Heinz, Mar 15 2020

A049080 Primes prime(k) for which A049076(k) = 4.

Original entry on oeis.org

11, 277, 1063, 2221, 3001, 4397, 7193, 9319, 10631, 12763, 15823, 21179, 22093, 24859, 30133, 33967, 37217, 38833, 40819, 43651, 55351, 57943, 60647, 66851, 68639, 77431, 80071, 84347, 90023, 98519, 101701, 103069, 125113, 127643
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

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

A058324 Primes for which A049076(p) = 8.

Original entry on oeis.org

709, 167449, 1128889, 3042161, 4535189, 7474967, 14161729, 19734581, 23391799, 29499439, 38790341, 56011909, 59053067, 68425619, 87019979, 101146501, 113256643, 119535373, 127065427, 138034009, 185350441, 196100297, 207460717, 233784751, 241568891, 280256489
Offset: 1

Views

Author

Robert G. Wilson v, Dec 12 2000

Keywords

Crossrefs

Programs

  • Maple
    map(ithprime@@7, remove(isprime, [$1..38]))[];  # Alois P. Heinz, Mar 15 2020
  • Mathematica
    Nest[ Prime, Select[ Range[34], !PrimeQ[ # ] &], 7] (* Robert G. Wilson v, Mar 15 2004 *)

Formula

a(n) = A000040(A058322(n)). - R. J. Mathar, Jul 07 2012

Extensions

More terms from Alois P. Heinz, Mar 15 2020

A058328 Primes for which A049076(p) = 12.

Original entry on oeis.org

9737333, 16123689073, 175650481151, 592821132889, 963726515729, 1765037224331, 3809491708961, 5669795882633, 6947574946087, 9163611272327, 12695664159413, 19638537755027, 20909033866927, 24894639811901
Offset: 1

Views

Author

Robert G. Wilson v, Dec 12 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Nest[ Prime, Select[ Range[30], !PrimeQ[ # ] &], 11] (* Robert G. Wilson v, Mar 15 2004 *)

Formula

a(n) = A000040(A058327(n)). - R. J. Mathar, Jul 07 2012
Showing 1-10 of 18 results. Next