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.

A205322 Smallest k>=0 such that (2^n-k)*2^n-1 and (2^n-k)*2^n+1 are a twin prime pair; or -1 if no such k exists.

Original entry on oeis.org

0, 1, -1, 1, 26, 22, 8, 28, 47, 16, 14, 19, 17, 316, 8, 133, 116, 166, 77, 364, 197, 49, 647, 1594, 848, 109, 869, 169, 773, 166, 1274, 466, 512, 694, 644, 733, 401, 1636, 662, 184, 71, 3106, 1157, 346, 332, 2194, 6179, 7999, 6023, 6784, 5612, 1108, 1001, 649, 197
Offset: 1

Views

Author

Pierre CAMI, Jul 14 2012

Keywords

Comments

Conjecture: there is always at least one k>=0 unless n=3.

Crossrefs

Programs

  • Maple
    A205322 := proc(n)
        local a,p ;
        for a from 0 to 2^n do
             p := (2^n-a)*2^n-1 ;
            if isprime(p) and isprime(p+2) then
                return a;
            end if;
        end do:
        return -1 ;
    end proc: # R. J. Mathar, Jul 18 2012
  • Mathematica
    Table[k = -1; While[k++; p = 4^n - k*2^n - 1; p > 0 && ! (PrimeQ[p] && PrimeQ[p + 2])]; If[p <= 0, -1, k], {n, 50}] (* T. D. Noe, Mar 15 2013 *)