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

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

Original entry on oeis.org

3, 7, 13, 127
Offset: 1

Views

Author

Brad Clardy, Feb 21 2013

Keywords

Comments

It is a conjecture that this is a finite sequence. These may be the only known cousin primes with this property.
The Cf.s list similar sequences, of the form -- numbers n such that n and n+m are prime and contain a power of two in the interval (n,n+m). The case where m=2, the twin prime case -- not listed, has only one member n=3. Another member would have to be a twin where n+2 was a Fermat type prime and n a Mersenne prime.

Crossrefs

Cf. A023200.
Cf. A220951 (gap of 6), A213210 (8), A220746 (10), A213677 (12), A222424 (14), A222227 (16), A222219 (18).

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
    //of two above gap. Primes less than this starting point can be checked by
    //inspection. In this example 3 also works.
    gap:=4;
    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^3) | IsPrime(n+4) and exists{t: t in [n+1..n+3 by 2] | IsOne(t/2^Valuation(t,2))}]; // Bruno Berselli, May 16 2013

A035044 Exchange 2 and 3.

Original entry on oeis.org

0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15, 16, 17, 18, 19, 30, 31, 33, 32, 34, 35, 36, 37, 38, 39, 20, 21, 23, 22, 24, 25, 26, 27, 28, 29, 40, 41, 43, 42, 44, 45, 46, 47, 48, 49, 50, 51, 53, 52, 54, 55, 56, 57, 58, 59, 60, 61, 63, 62, 64, 65, 66, 67, 68
Offset: 0

Views

Author

Keywords

Comments

The map which is applied to primes in A171018. - M. F. Hasler, Feb 12 2013
Rearrangement of A001477 (the nonnegative integers). - Zak Seidov, Feb 15 2013

Crossrefs

Programs

  • Mathematica
    FromDigits[IntegerDigits[#]/.{2->3,3->2}]&/@Range[0,68] (* Zak Seidov, Feb 15 2013 *)
  • PARI
    A222227(n, d=[0, 1, 3, 2, 4, 5, 6, 7, 8, 9])=sum(i=1, #n=digits(n), d[n[i]+1]*10^(#n-i)) \\ gives correct value for n=0 iff d[1]=0, since digits(0)=[] in PARI (v.2.6), M. F. Hasler, Feb 12 2013
Showing 1-2 of 2 results.