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

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

A073704 Smallest prime p such that also p-prime(n)*2 is a prime.

Original entry on oeis.org

7, 11, 13, 17, 29, 29, 37, 41, 53, 61, 67, 79, 89, 89, 97, 109, 131, 127, 137, 149, 149, 163, 173, 181, 197, 233, 211, 227, 223, 229, 257, 269, 277, 281, 311, 307, 317, 331, 337, 349, 389, 367, 389, 389, 397, 401, 433, 449, 457, 461, 479, 491, 487, 509, 521
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 04 2002

Keywords

Crossrefs

A127019 a(n) is the least semiprime s such that s - 2*n is also a semiprime.

Original entry on oeis.org

6, 10, 10, 14, 14, 21, 35, 22, 22, 26, 26, 33, 35, 34, 34, 38, 38, 46, 77, 46, 46, 58, 55, 57, 65, 58, 58, 62, 62, 69, 77, 74, 87, 74, 74, 82, 95, 82, 82, 86, 86, 93, 95, 94, 94, 106, 115, 106, 119, 106, 106, 118, 115, 118, 119, 118, 118, 122, 122, 129, 143, 133, 141, 134
Offset: 1

Views

Author

Rick L. Shepherd, Jan 02 2007

Keywords

Crossrefs

Programs

  • Maple
    N:= 500: # for terms before the first term > N
    P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
    SP:= select(`<=`,{seq(seq(P[i]*P[j],i=1..j),j=1..nops(P))},N):
    R:= NULL:
    for n from 1 do
      Q:= SP intersect (SP +~ (2*n));
      if Q = {} then break fi;
      R:= R, min(Q)
    od:
    R; # Robert Israel, Jan 30 2025
  • Mathematica
    sp=Select[Range[1000],PrimeOmega[#]==2&];seq={};Do[s=0;Until[t=sp[[s]]-2n;PrimeOmega[t]==2&&t>0,s++];AppendTo[seq,sp[[s]]],{n,64}];seq (* James C. McMahon, Dec 30 2024 *)

A155882 Smallest positive prime number such that a(n)-2n is also prime, a(n) < a(n+1), and the differences a(n)-2n must increase with n.

Original entry on oeis.org

5, 11, 17, 31, 41, 53, 61, 83, 89, 103, 131, 137, 157, 167, 179, 199, 227, 233, 271, 281, 293, 307, 317, 331, 367, 383, 401, 409, 431, 439, 463, 503, 509, 547, 557, 563, 577, 599, 619, 643, 653, 661, 673, 701, 709, 733, 821, 829, 859, 887, 911, 967, 983, 991
Offset: 1

Views

Author

Eric Angelini, Jan 29 2009

Keywords

Comments

Subtracting from a(1) twice n=1 gives 5-2=3, which is a prime number; subtracting from a(2) twice n=2 gives 11-4=7, which is a prime number; subtracting from a(3) twice n=3 gives 17-6=11, which is a prime number; subtracting from a(4) twice n=4 gives 31-8=23, which is a prime number; etc.

Crossrefs

Cf. A020484, A108184 (for the differences a(n)-2n).

Programs

  • Maple
    b:= proc(n) option remember; global a; a(n); b(n) end: a:= proc(n) option remember; local m; global b; if n=1 then b(1):= 3; 5 else for m from a(n-1)+2 by 2 while not (isprime(m) and (b(n-1)Alois P. Heinz, Feb 05 2009

Extensions

Corrected definition and more terms from Alois P. Heinz, Feb 05 2009

A206770 Smallest number k such that sigma(k-2*n)=sigma(k)-2*n.

Original entry on oeis.org

5, 7, 11, 11, 13, 17, 17, 19, 23, 23, 29, 29, 21, 31, 37, 37, 37, 41, 28, 33, 47, 47, 53, 53, 53, 59, 59, 44, 61, 67, 67, 67, 71, 57, 73, 79, 79, 79, 83, 83, 69, 89, 74, 101, 68, 97, 97, 85, 101, 103, 107, 107, 109, 113, 93, 131, 127, 127, 131, 127, 127, 127
Offset: 1

Views

Author

Paolo P. Lava, Jan 10 2013

Keywords

Comments

Note all k>=1 are considered, even if k-2n<0. If the search space is k>=2n, variants of A020484 and A060264 appear. - R. J. Mathar, Jan 12 2013

Examples

			a(15)=37 because 37 is the minimum number for which sigma(37-2*15)=sigma(7)=8 and sigma(37)-2*15=38-30=8.
		

Crossrefs

Programs

  • Maple
    A206770:=proc(q)
    local k,n;
    for n from 1 to q do
    for k from 1 to q do
      if sigma(k-2*n)=sigma(k)-2*n then print(k); break; fi;
    od; od; end:
    A206770(1000000000);
    A206770 := proc(n)
        local k ;
        for k from 1 do
            if numtheory[sigma](k-2*n) = numtheory[sigma](k)-2*n then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Jan 12 2013

A107257 Smallest prime p such that for each j <= n there are primes a < b <= p whose difference b - a is 2*j.

Original entry on oeis.org

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, 101, 101, 101, 101, 101, 101, 103, 107, 107, 109, 113, 113, 131, 131, 131, 131, 131, 131, 131, 131
Offset: 1

Views

Author

Klaus Brockhaus, May 15 2005

Keywords

Comments

Every positive even number <= 2*n is the difference of two suitable primes <= a(n).
Sequence is nondecreasing, whereas the related sequence A020484 is not; first divergence is at 45: a(45) = 101, A020484(45) = 97.

Examples

			Consider n = 45: 89, 97, 101 are consecutive primes, 2*45 = 97 - 7, but 2*44 = 101 - 13 cannot be written as b - a where a and b are primes <=97, hence a(45) = 101.
		

Crossrefs

Showing 1-6 of 6 results.