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

A060264 First prime after 2n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Comments

Conjecture: for n > 2, this is the least prime p such that 1^2, 2^2, 3^2, ..., n^2 are distinct mod p. Checked to 10^4. - Charles R Greathouse IV, Dec 03 2022

Crossrefs

Programs

Formula

a(n) = A151800(2*n). - Reinhard Zumkeller, Nov 15 2013

A102820 Number of primes between 2*prime(n) and 2*prime(n+1), where prime(n) is the n-th prime.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 3, 1, 1, 1, 3, 3, 0, 2, 2, 0, 3, 1, 2, 4, 2, 0, 1, 0, 1, 6, 1, 3, 1, 3, 0, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 3, 2, 2, 0, 1, 1, 1, 1, 3, 6, 2, 0, 1, 6, 1, 3, 0, 1, 1, 3, 2, 2, 1, 2, 1, 1, 2, 4, 1, 3, 1, 1, 2, 1, 2, 1, 0, 1, 4, 2, 1, 3, 0, 2, 5, 0, 5, 3, 3, 2, 1, 0, 2
Offset: 1

Views

Author

Ali A. Tanara (tanara(AT)khayam.ut.ac.ir), Feb 27 2005

Keywords

Comments

Number of primes between successive even semiprimes. [Juri-Stepan Gerasimov, May 01 2010]
From Peter Munn, Jun 01 2023: (Start)
First differences of A020900.
A080192 lists prime(n) corresponding to the zero terms.
A104380(k) is prime(n) corresponding to the first occurrence of k as a term.
If a(n) is nonzero, A059786(n) is the smallest and A059788(n+1) the largest of the a(n) enumerated primes. In the tree of primes described in A290183, these primes label the child nodes of prime(n).
Conjecture: the asymptotic proportions of 0's, 1's, ... , k's, ... are 1/3, 2/9, ... , 2^k/3^(k+1), ... .
(End)

Examples

			a(15)=3 because there are 3 primes between the doubles of the 15th and 16th primes, that is between 2*47 and 2*53.
		

Crossrefs

Sequences with related analysis: A020900, A059786, A059788, A080192, A104380, A290183.
Cf. A104272, A080359. [Vladimir Shevelev, Aug 24 2009]
Sequences with similar definitions: A104289, A217564.

Programs

  • Haskell
    a102820 n = a102820_list !! (n-1)
    a102820_list =  map (sum . (map a010051)) $
       zipWith enumFromTo a100484_list (tail a100484_list)
    -- Reinhard Zumkeller, Apr 29 2012
    
  • Mathematica
    Table[PrimePi[2 Prime[n+1]]-PrimePi[2 Prime[n]], {n, 150}] (* Zak Seidov *)
    Differences[PrimePi[2 Prime[Range[110]]]] (* Harvey P. Dale, Oct 29 2022 *)
  • PARI
    a(n) = primepi(2*prime(n+1)) - primepi(2*prime(n)); \\ Michel Marcus, Sep 22 2017

Formula

a(n) = A020900(n+1) - A020900(n). - Peter Munn, Jun 01 2023

Extensions

More terms from Zak Seidov, Feb 28 2005

A290183 a(n) is least p to label a node of height n in the rooted tree which has the primes (A000040) as labels for its nonroot nodes, and the parent of the node labeled p is the node labeled with the greatest prime less than p/2 (or the root if there is no such node).

Original entry on oeis.org

59, 331, 163, 79, 37, 17, 724777, 941593, 3578683, 73397147, 52457707, 26228849, 2600553509, 1300276753
Offset: 0

Views

Author

Peter Munn, Jul 23 2017

Keywords

Comments

The parent of the node labeled p is the adjacent node through which it is connected to the root.
The "tree of primes" defined above relates to many older sequences. The node labeled A055377(n) is parent of the node labeled n. The node labeled prime(k) has A102820(k) child nodes and unless it has no child nodes, these are labeled with the primes from A059786(k) to A059788(k+1). The leaf node labels are A080192. The nodes of depth m are those with labels in the interval [A055496(m), A055496(m+1)). The full tree may be defined using A000040 read as a table with row lengths given by A102820 prefixed by 2.
If the set of heights of nodes has a greatest finite value, k, this sequence is finite with k+1 contiguous defined terms.
That said, the author's initial assessment is that occurrence of height n nodes will have similarities to occurrence of least primes of prime k-tuples, namely: (1) labels of nodes of height n will occur almost as though at random intervals amongst the primes; (2) for any n, the apparent odds against a prime p being such a label will not be greater than polynomial in log(p); and thus (3) a(n) plausibly exists for all n.
Some initial empirical observation suggests nodes of height n+1 may occur something like 5 to 10 times less frequently than those of height n.
Terms a(1) to a(5) come from the subtree consisting of the node labeled 17 and its descendants, as depicted in the example section below. This implies 4 consecutive negative first differences, which may be rare later in the sequence.

Examples

			The only prime between 2 * 331 = 662 and 2 * nextprime(331) = 2 * 337 = 674 is 673, so the node labeled 331 is parent only to the node labeled 673. There are no primes between 2 * 673 = 1346 and 2 * nextprime(673) = 2 * 677 = 1354, so the node labeled 673 is a leaf. Thus the node labeled 331 has height 1. It is the least such prime, so a(1) = 331.
The "tree of primes" defined above starts:
                            Root
               +----------------------------+
               2                            3
               |                            |
               5                            7
       +--------------+                 +-------+
      11             13                17      19
       |         +-----------+          |    +----+
      23        29          31         37   41   43
    +----+    +----+    +----+----+     |    |    |
   47   53   59   61   67   71   73    79   83   89
The subtree consisting of the node labeled 17 and all 5 of its descendants is:
      17
       |
      37
       |
      79
       |
     163
       |
     331
       |
     673
From _Peter Munn_, Nov 22 2018: (Start)
The subtree consisting of the node labeled with a(7) = 941593 and its descendants is:
             941593
        +------+--------+
     1883191         1883197
        |               |
     3766387         3766397
                        |
                     7532813
      +-----------------+-----------------+
  15065627          15065639           15065641
      |           +-----------+           |
  30131267    30131279    30131281     30131291
                                          |
                                       60262597
                                          |
                                      120525217
(End)
		

Crossrefs

Cf. A080192 is a list of leaf nodes.
Cf. A055377, A059786, A059788, and A102820 are associated with the parent/child node relationship.

Programs

  • PARI
    lista(nbp) = {my(v = primes(nbp), nv, x); for (n=0, oo, nv = Set(apply(x->precprime(x >> 1), v)); x = vecmin(setminus(v, nv)); if (x > vecmax(nv), break); print1(x, ", "); v = nv;);} /* use nbp=6*10^6 for 7 terms and nbp=2*10^7 for 8 terms */ \\ Michel Marcus, Nov 19 2018
    
  • PARI
    ntimes(p, n) = for (k=1, n, p = precprime(p>>1)); p;
    a(n) = {p = 2; x = ntimes(p, n); p = nextprime(p+1); q = 5; y = ntimes(q, n+1); q = nextprime(q+1); for (k= 1, oo, if (y != x, return (x)); until((ny = ntimes(q, n+1)) != x, q = nextprime(q+1)); until((nx = ntimes(p, n)) != x, p = nextprime(p+1)); x = nx; y = ny;);} \\ Michel Marcus, Dec 08 2018

Formula

a(n) = min (A055377^(n+1) \ A055377^(n+2)), where A055377^(i) denotes the image set of N after i applications of A055377. - clarified following suggestion by Michel Marcus, Nov 13 2018

Extensions

Candidate for a(8) confirmed by Michel Marcus, Nov 14 2018
a(9)-a(13) from Michel Marcus, Jan 02 2019

A370008 a(n) is the greatest prime less than 3*prime(n).

Original entry on oeis.org

5, 7, 13, 19, 31, 37, 47, 53, 67, 83, 89, 109, 113, 127, 139, 157, 173, 181, 199, 211, 211, 233, 241, 263, 283, 293, 307, 317, 317, 337, 379, 389, 409, 409, 443, 449, 467, 487, 499, 509, 523, 541, 571, 577, 587, 593, 631, 661, 677, 683, 691, 709, 719, 751
Offset: 1

Views

Author

Clark Kimberling, Feb 09 2024

Keywords

Examples

			5 < 3*2 < 7 < 3*3 < 11 < 13 < 3*5, so (a(1), a(2), a(3)) = (5,7,13).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[PrimePi[3*Prime[n]]], {n,1,200}]
  • PARI
    a(n) = precprime(3*prime(n)); \\ Michel Marcus, Feb 10 2024

A117928 Triangle read by rows: T(n,k) = smallest prime of the form (k+1)*prime(n) + k*i for some i>0, 0<=k

Original entry on oeis.org

2, 3, 7, 5, 11, 17, 7, 17, 23, 31, 11, 23, 37, 47, 59, 13, 29, 41, 61, 73, 83, 17, 37, 53, 71, 89, 107, 131, 19, 41, 59, 79, 103, 139, 139, 173, 23, 47, 71, 101, 127, 163, 167, 191, 223, 29, 59, 89, 131, 149, 179, 227, 239, 269, 317, 31, 67, 97, 127, 163, 191, 223, 269
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 03 2006

Keywords

Comments

T(n,0) = A000040(n); T(n,1) = A059786(n) for n>1.

Programs

  • Maple
    T:= proc(n,k) local x;
      for x from (k+1)*ithprime(n) by k do
        if isprime(x) then return x fi
      od
    end proc:
    for n from 1 to 10 do
      seq(T(n,k),k=0..n-1)
    od; # Robert Israel, Nov 23 2020

A060271 Difference between smallest prime following and largest prime preceding 2*(n-th prime).

Original entry on oeis.org

2, 2, 4, 4, 4, 6, 6, 4, 4, 6, 6, 6, 4, 6, 8, 4, 14, 14, 6, 10, 10, 6, 4, 6, 4, 12, 12, 12, 12, 4, 6, 6, 6, 4, 14, 14, 4, 14, 6, 10, 6, 8, 4, 6, 8, 4, 10, 6, 8, 4, 4, 12, 8, 4, 12, 18, 18, 6, 10, 6, 6, 10, 4, 12, 12, 10, 12, 4, 10, 10, 8, 10, 6, 8, 4, 8, 14, 10, 12, 10, 10, 14, 4, 14, 4, 4, 20, 8
Offset: 1

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			For n = 1: prime(1) = 2, 2*prime(1) = 4 is between 3 and 5, their difference is 2 = a(1).
For n = 6: prime(6) = 13, 2*prime(6) = 26 is between 23 and 29 and their difference is 6 = a(6).
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*ithprime(j))-prevprime(2*ithprime(j)),j=1...256)];
  • Mathematica
    dsplp[n_]:=Module[{np=2Prime[n]},NextPrime[np]-NextPrime[np,-1]]; Array[ dsplp,90] (* Harvey P. Dale, Mar 20 2013 *)
  • PARI
    a(n) = {my(m = 2*prime(n)); nextprime(m+1) - precprime(m-1);} \\ Amiram Eldar, Feb 08 2025

Extensions

Offset changed to 1 and a(1) prepended by Amiram Eldar, Feb 08 2025

A370009 a(n) is the least prime greater than 3*prime(n).

Original entry on oeis.org

7, 11, 17, 23, 37, 41, 53, 59, 71, 89, 97, 113, 127, 131, 149, 163, 179, 191, 211, 223, 223, 239, 251, 269, 293, 307, 311, 331, 331, 347, 383, 397, 419, 419, 449, 457, 479, 491, 503, 521, 541, 547, 577, 587, 593, 599, 641, 673, 683, 691, 701, 719, 727, 757
Offset: 1

Views

Author

Clark Kimberling, Feb 09 2024

Keywords

Examples

			5 < 3*2 < 7 < 3*3 < 11 < 13 < 3*5 < 17, so (a(1), a(2), a(3)) = (7,11,17).
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[Prime[PrimePi[3*Prime[n]]]], {n,1,200}]
  • PARI
    a(n) = nextprime(3*prime(n)); \\ Michel Marcus, Feb 10 2024

Formula

a(n) = A151800(A001748(n)).

A370010 a(n) is the greatest prime less than 4*prime(n).

Original entry on oeis.org

7, 11, 19, 23, 43, 47, 67, 73, 89, 113, 113, 139, 163, 167, 181, 211, 233, 241, 263, 283, 283, 313, 331, 353, 383, 401, 409, 421, 433, 449, 503, 523, 547, 547, 593, 601, 619, 647, 661, 691, 709, 719, 761, 769, 787, 787, 839, 887, 907, 911, 929, 953, 953, 997
Offset: 1

Views

Author

Clark Kimberling, Feb 09 2024

Keywords

Examples

			7 < 4*2 < 11 < 4*3 < 13 < 17 < 19  < 5*3 < 23, so (a(1), a(2), a(3)) = (7,11,19).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[PrimePi[4*Prime[n]]], {n,1,200}]
  • PARI
    a(n) = precprime(4*prime(n)); \\ Michel Marcus, Feb 10 2024

A370011 a(n) is the least prime greater than 4*prime(n).

Original entry on oeis.org

11, 13, 23, 29, 47, 53, 71, 79, 97, 127, 127, 149, 167, 173, 191, 223, 239, 251, 269, 293, 293, 317, 337, 359, 389, 409, 419, 431, 439, 457, 509, 541, 557, 557, 599, 607, 631, 653, 673, 701, 719, 727, 769, 773, 797, 797, 853, 907, 911, 919, 937, 967, 967
Offset: 1

Views

Author

Clark Kimberling, Feb 09 2024

Keywords

Examples

			7 < 4*2 < 11 < 4*3 < 13 < 17 < 19 < 4*5 < 23, so (a(1), a(2), a(3)) = (11,13,23).
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[Prime[PrimePi[4*Prime[n]]]], {n, 1, 200}]
  • PARI
    a(n) = nextprime(4*prime(n)); \\ Michel Marcus, Feb 10 2024
Showing 1-9 of 9 results.