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

A220746 Numbers n such that n and n + 10 are prime and there is a power of two in the interval (n, n+10).

Original entry on oeis.org

3, 7, 13, 31, 61, 127, 1021, 1048573, 23945242826029513411849172299223580994042798784118781
Offset: 1

Views

Author

Brad Clardy, Feb 20 2013

Keywords

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. Program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked by inspection. In this example 3 also works.
    gap:=10;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;
    
  • Mathematica
    Union[Flatten[Table[Select[Range[2^n - 9, 2^n - 1, 2], PrimeQ[#] && PrimeQ[# + 10] &], {n, 3, 200}]]] (* T. D. Noe, Feb 20 2013 *)
    Union[Flatten[Table[Select[Thread[{Range[2^n-10,2^n],Range[ 2^n,2^n+10]}],AllTrue[ #,PrimeQ]&],{n,3,1000}],1][[;;,1]]] (* Harvey P. Dale, Feb 19 2023 *)
  • PARI
    print1(3); for(n=4,500,forprime(p=2^n-9,2^n-1,if(isprime(p+10), print1(", "p)))) \\ Charles R Greathouse IV, Feb 20 2013

A220951 Primes p such that p+6 is also prime and there is a power of two in the interval (p,p+6).

Original entry on oeis.org

5, 7, 11, 13, 31, 61, 251, 4093
Offset: 1

Views

Author

Brad Clardy, Feb 20 2013

Keywords

Comments

A search for sexy primes bracketing a power of two was conducted up to 2^1500. It is conjectured that this is a finite sequence.
On the basis of existing work about primes of the form 2^n+k and 2^n-k, plus a few additional tests, we have a(9) > 2^750740. - Giovanni Resta, Feb 21 2013

Crossrefs

Programs

A222227 Numbers n such that n and n + 16 are prime and there is a power of two in the interval (n,n+16).

Original entry on oeis.org

3, 7, 13, 31, 241, 65521, 1048573, 2305843009213693951
Offset: 1

Views

Author

Brad Clardy, Feb 23 2013

Keywords

Comments

It is a conjecture that this is a finite sequence. A search was conducted out to 2^1500.

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. Program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked by inspection.
    gap:=16;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;

A213210 Numbers n such that n and n + 8 are prime and there is a power of two in the interval (n,n+8).

Original entry on oeis.org

3, 5, 11, 29, 59, 4091, 262139
Offset: 1

Views

Author

Brad Clardy, Mar 02 2013

Keywords

Comments

It is a conjecture that this sequence is finite. A search around 2^n was done up to 2^1500.

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. The program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked inspection. In this example 3 and 5 also work.
    gap:=8;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;
    
  • Magma
    [n: n in PrimesUpTo(10^6) | IsPrime(n+8) and exists{t: t in [n+1..n+7 by 2] | IsOne(t/2^Valuation(t,2))}]; // Bruno Berselli, May 16 2013

A213677 Numbers n such that n and n + 12 are prime and there is a power of two in the interval (n, n+12).

Original entry on oeis.org

5, 7, 11, 29, 31, 59, 61, 127, 251, 509, 1019, 1021, 262139, 1048571, 2147483647
Offset: 1

Views

Author

Brad Clardy, Mar 04 2013

Keywords

Comments

It is a conjecture that this is a finite sequence. A search was conducted out to 2^1500.

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. Program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked by inspection.
    gap:=12;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;

A222219 Numbers n such that n and n + 18 are prime and there is a power of two in the interval (n,n+18).

Original entry on oeis.org

5, 11, 13, 19, 23, 29, 53, 61, 113, 239, 251, 503, 1013, 1021, 4093, 8191, 65519, 65521, 262133, 1048571, 4194301, 302231454903657293676533
Offset: 1

Views

Author

Brad Clardy, Feb 23 2013

Keywords

Comments

It is a conjecture that this sequence is finite. A search around 2^n was done up to 2^1500.

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. Program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked by inspection.
    gap:=18;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;
  • Mathematica
    Flatten[Table[Select[2^n-Range[17],AllTrue[{#,#+18},PrimeQ]&],{n,4,80}]]// Sort (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 04 2019 *)

A222424 Numbers n such that n and n + 14 are prime and there is a power of two in the interval (n,n+14).

Original entry on oeis.org

3, 5, 23, 29, 53, 59, 509, 1019, 2039, 262133, 262139, 536870909, 73786976294838206459, 2787593149816327892691964784081045188247543
Offset: 1

Views

Author

Brad Clardy, Feb 24 2013

Keywords

Comments

It is a conjecture that this is a finite sequence. A search was conducted out to 2^1500.

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. Program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked by inspection.
    gap:=14;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;
Showing 1-7 of 7 results.