login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A212038 The size of the set of numbers k>=0 such that all (2^n-k)*2^n-1 are prime but only (2^n-k)*2^n+1 with the largest k is also the associated twin prime. 1
1, 7, 5, 2, 4, 11, 6, 1, 3, 2, 31, 2, 11, 11, 11, 6, 30, 16, 2, 36, 90, 56, 11, 52, 13, 36, 10, 62, 20, 31, 23, 28, 30, 14, 47, 22, 10, 5, 104, 39, 11, 14, 64, 184, 209, 176, 193, 162, 25, 38, 23, 5, 27, 157, 5, 17, 32, 90, 1, 199, 96, 83, 29, 82, 12, 220, 19, 40, 37, 13, 16, 120, 11, 130, 12, 77, 202 (list; graph; refs; listen; history; text; internal format)
OFFSET

4,2

COMMENTS

Search set similar to A212037 but the sign of k in the prime form is switched.

Heuristically the average of a(n)/n for n=1 to N tends to 1 as N increases.

LINKS

Pierre CAMI, Table of n, a(n) for n = 4..825

MAPLE

A212038 := proc(n)

    local a, k, p ;

    a := 0 ;

    for k from 0 do

        p := (2^n-k)*2^n-1 ;

        if isprime(p) then

            a := a+1 ;

        end if;

        if isprime(p) and isprime(p+2) then

            return a;

        end if;

    end do:

end proc: # R. J. Mathar, Jul 21 2012

PROG

SCRIPT

DIM nn, 3

DIM jj

DIM kk

DIMS tt

OPENFILEOUT myfile, a(n).txt

LABEL loopn

SET nn, nn+1

IF nn>825 THEN END

SET kk, -1

SET jj, 0

LABEL loopk

SET kk, kk+1

SETS tt, %d, %d\,; nn; kk

PRP (2^nn-kk)*2^nn-1, tt

IF ISPRP THEN GOTO a

IF ISPRIME THEN GOTO a

GOTO loopk

LABEL a

SET jj, jj+1

PRP (2^nn-kk)*2^nn+1, tt

IF ISPRP THEN GOTO d

IF ISPRIME THEN GOTO d

GOTO loopk

LABEL d

SETS tt, %d, %d\,; nn; jj

WRITE myfile, tt

GOTO loopn

CROSSREFS

Cf. A191619, A191620, A205322.

Sequence in context: A070404 A258370 A135537 * A335863 A112545 A021934

Adjacent sequences:  A212035 A212036 A212037 * A212039 A212040 A212041

KEYWORD

nonn

AUTHOR

Pierre CAMI, Jul 14 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 27 03:21 EDT 2020. Contains 337380 sequences. (Running on oeis4.)