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.

A101044 Primes corresponding to A101043 (which is A101042 sorted).

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 11, 31, 29, 23, 17, 43, 37, 41, 53, 47, 67, 79, 61, 71, 59, 73, 101, 149, 83, 127, 97, 89, 109, 137, 157, 107, 103, 151, 113, 163, 139, 181, 197, 131, 193, 167, 191, 173, 227, 199, 179, 223, 211, 307, 241, 349, 229, 239, 233, 257, 379, 277, 271
Offset: 1

Views

Author

Jens Kruse Andersen, Nov 28 2004

Keywords

Comments

The order in which the primes (except 2) first appear in A020483. It is conjectured that all primes are in this sequence.

Crossrefs

A020483 Least prime p such that p+2n is also prime.

Original entry on oeis.org

2, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 7, 5, 3, 3, 7, 5, 3, 5, 3, 3, 5, 3, 7, 5, 3, 7, 5, 3, 3, 7, 5, 3, 5, 3, 3, 7, 5, 3, 5, 3, 7, 5, 3, 13, 7, 5, 3, 5, 3, 3, 5, 3, 3, 5, 3, 19, 13, 11, 13, 7, 5, 3, 5, 3, 7, 5, 3, 3, 11, 11, 7, 5, 3, 3, 7, 5, 3, 7, 5, 3, 5, 3, 7, 5, 3, 7, 5, 3, 3, 11, 11, 7, 5, 3, 3, 5, 3, 3, 13, 11, 31, 7
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that a(n) always exists. a(n) has been computed for n < 5 * 10^11, with largest value a(248281210271) = 3307. - Jens Kruse Andersen, Nov 28 2004
If a(n) = a(n+1) = k, then 2*n + k and 2*(n+1) + k are twin primes. - Ya-Ping Lu, Sep 22 2020

Examples

			Given n = 2, we see that 2 + 2n = 6 = 2 * 3, but 3 + 2n = 7, which is prime, so a(2) = 3.
Given n = 3, we see that 2 + 2n = 8 = 2^3 and 3 + 2n = 9 = 3^2, but 5 + 2n = 11, which is prime, so a(3) = 5.
		

Crossrefs

Cf. A101045, A239392 (record values).
It is likely that A054906 is an identical sequence, although this seems to have not yet been proved. - N. J. A. Sloane, Feb 06 2017

Programs

  • GAP
    P:=Filtered([1..10000],IsPrime);;
    a:=List(List([0..110],n->Filtered(P,i->IsPrime(i+2*n))),Minimum); # Muniru A Asiru, Mar 26 2018
  • Haskell
    a020483 n = head [p | p <- a000040_list, a010051' (p + 2 * n) == 1]
    -- Reinhard Zumkeller, Nov 29 2014
    
  • Maple
    A020483 := proc(n)
        local p;
        p := 2;
        while true do
            if isprime(p+2*n) then
                return p;
            end if;
            p := nextprime(p) ;
        end do:
    end proc:
    seq(A020483(n),n=0..40); # R. J. Mathar, Sep 23 2016
  • Mathematica
    Table[j = 1; found = False; While[!found, j++; found = PrimeQ[Prime[j] + 2i]]; Prime[j], {i, 200}]
    leastPrimep2n[n_] := Block[{k = 1, p, q = 2 n}, While[p = Prime@k; !PrimeQ[p + q], k++]; p]; Array[leastPrimep2n, 102] (* Robert G. Wilson v, Mar 26 2008 *)
  • PARI
    a(n)=forprime(p=2,,if(isprime(p+2*n), return(p))) \\ Charles R Greathouse IV, Mar 19 2014
    

Formula

If a(n) exists, a(n) < 2n, which of course is a great overestimate. - T. D. Noe, Jul 16 2002
a(n) = A087711(n) - n. - Zak Seidov, Nov 28 2007
a(n) = A020484(n) - 2n. - Zak Seidov, May 29 2014
a(n) = 2 if and only if n = 0. - Alonso del Arte, Mar 14 2018

Extensions

a(0)=2 added by N. J. A. Sloane, Apr 25 2015

A101042 a(n) is the smallest positive d such that the n-th prime is the smallest prime p for which p+d is also prime.

Original entry on oeis.org

1, 2, 6, 22, 116, 88, 470, 112, 284, 242, 202, 772, 1326, 718, 1334, 1328, 2558, 1762, 1642, 2402, 3274, 1732, 7094, 9512, 7984, 5246, 12688, 10532, 9952, 16766, 7702, 60458, 9974, 25708, 5888, 13528, 10342, 25678, 62156, 69518, 76838, 37666
Offset: 1

Views

Author

Jens Kruse Andersen, Nov 28 2004

Keywords

Comments

Except for n=1, A020483(a(n)/2) is the first appearance of the n-th prime. It is conjectured that a(n) always exists. a(386) is the first number which must be above 10^12.

Examples

			a(3)=6 because: The 3rd prime is 5. 2+6, 3+6 is composite, 5+6 is prime. 6 is the smallest such number.
		

Crossrefs

A101045 Record size primes in A101044.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 31, 43, 53, 67, 79, 101, 149, 157, 163, 181, 197, 227, 307, 349, 379, 409, 431, 619, 631, 661, 691, 751, 757, 811, 829, 1093, 1117, 1217, 1279, 1423, 1453, 1481, 1531, 1549, 1579, 1759, 1877, 2239, 2273, 2287, 2383, 2447, 2659, 2671, 2707
Offset: 1

Views

Author

Jens Kruse Andersen, Nov 28 2004

Keywords

Comments

This sequence (except 2) is also the record size primes in the longer A020483.
Conjecture: lim_{n->infinity} a(n)/n^2 = 1. - Ya-Ping Lu, Sep 24 2020

Crossrefs

Programs

  • Python
    from sympy import isprime, nextprime
    m = p_max = 0
    while m >= 0:
        p = 2
        while isprime(p + 2*m) == 0:
            p = nextprime(p)
        if p > p_max:
            print(p)
            p_max = p
        m += 1 # Ya-Ping Lu, Sep 24 2020

A101046 d such that the smallest prime p for which p+d is also prime is larger than for any smaller d.

Original entry on oeis.org

1, 2, 6, 22, 88, 112, 202, 718, 1328, 1642, 1732, 5246, 5888, 10342, 25678, 37666, 59894, 76004, 103102, 108412, 180814, 359662, 651362, 872698, 2373478, 6088792, 7642528, 9244552, 13038352, 13591192, 24318988, 34857778, 55076404, 147838742
Offset: 1

Views

Author

Jens Kruse Andersen, Nov 28 2004

Keywords

Comments

The numbers in A101042 which are smaller than all following numbers.

Examples

			Consider d=6. The smallest prime p for which p+6 is also prime, is p=5. All numbers below d=6 have a p<5 (or no p at all), so 6 is in the sequence.
		

Crossrefs

Showing 1-5 of 5 results.