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.

A205321 Smallest k>=0 such that (2^n+k)*2^n-1 and (2^n+k)*2^n+1 are a twin prime pair.

Original entry on oeis.org

0, 11, 1, 11, 4, 11, 13, 116, 34, 14, 241, 44, 97, 458, 337, 59, 604, 206, 67, 167, 424, 179, 97, 326, 259, 284, 1177, 77, 328, 356, 508, 74, 1798, 749, 2197, 1289, 643, 839, 1171, 1427, 814, 2564, 31, 4244, 379, 5099, 3706, 4871, 2719, 3194, 7057, 122, 5329, 2636, 301, 2852, 3793
Offset: 1

Views

Author

Pierre CAMI, Jul 14 2012

Keywords

Comments

Conjecture : there is at least one k for each n.

Crossrefs

Programs

  • Maple
    A205321 := proc(n)
        local a,p ;
        for a from 0 do
             p := (2^n+a)*2^n-1 ;
            if isprime(p) and isprime(p+2) then
                return a;
            end if;
        end do:
    end proc: # R. J. Mathar, Jul 18 2012

Formula

a(n) = A082466(2^n), n>1. - R. J. Mathar, Jul 20 2012

A212487 Smallest k > 0 such that (5^n+k)*5^n-1 and (5^n+k)*5^n+1 are a twin prime pair.

Original entry on oeis.org

1, 17, 85, 47, 19, 71, 955, 815, 223, 269, 607, 1619, 2737, 53, 883, 1319, 2797, 4757, 1585, 1535, 295, 557, 3511, 269, 277, 5747, 2125, 53, 13345, 2195, 109, 1175, 2995, 5597, 3787, 1619, 6577, 8549, 3475, 5435, 4807, 20045, 23353, 9341, 2857, 2117, 1429, 16283, 25333, 7949
Offset: 1

Views

Author

Pierre CAMI, Jul 18 2012

Keywords

Comments

Conjecture: there is always one such k for n > 0.

Crossrefs

Cf. A212488.

Programs

  • Maple
    A212487 := proc(n)
        local k,p ;
        for k from 1 do
            p := (5^n+k)*5^n-1 ;
            if isprime(p) and isprime(p+2) then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Jul 20 2012
  • PFGW
    SCRIPT
    DIM nn,0
    DIM kk
    DIM jj
    DIMS tt
    OPENFILEOUT myfile,a(n).txt
    OPENFILEOUT myf,b(n).txt
    LABEL loopn
    SET nn,nn+1
    SET jj,0
    IF nn>500 THEN END
    SET kk,-1
    LABEL loopk
    SET kk,kk+2
    SETS tt,%d,%d\,;nn;kk
    PRP (5^nn+kk)*5^nn-1,tt
    IF ISPRP THEN GOTO a
    IF ISPRIME THEN GOTO a
    GOTO loopk
    LABEL a
    SET jj,jj+1
    PRP (5^nn+kk)*5^nn+1,tt
    IF ISPRP THEN GOTO d
    IF ISPRIME THEN GOTO d
    GOTO loopk
    LABEL d
    WRITE myfile,tt
    SETS tt,%d,%d\,;nn;jj
    WRITE myf,tt
    GOTO loopn

Formula

a(n) = A082466(5^n). - R. J. Mathar, Jul 20 2012
Showing 1-2 of 2 results.