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

A214501 The size of the set of numbers k>=0 such that all (3^n-k)*2^n-1 are prime but only the last (largest) (3^n-k)*2^n+1 is also an associated twin prime.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 6, 1, 2, 1, 6, 8, 8, 41, 11, 5, 8, 11, 24, 35, 15, 22, 5, 11, 19, 15, 16, 60, 10, 21, 35, 82, 13, 8, 4, 1, 44, 4, 33, 12, 29, 59, 45, 17, 60, 4, 1, 119, 38, 6, 35, 1, 29, 48, 100, 72, 31, 128, 27, 33, 29, 41, 14, 21, 40, 19, 52, 36, 79, 54
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Starting at a count of zero, we consider for increasing k>=0 the pairs (3^n-k)*2^n+-1. If the smaller of these two numbers is prime, we increase the counter. If the larger of these two numbers is also prime, we admit the counter to the sequence. It is basically a measure of how many unsuccessful primality tests on the larger of the two numbers are done before it becomes a compatible twin prime.
Heuristically, the average of a(n)/n over n=1 to N tends to 0.61 as N increases.

Crossrefs

A214502 The size of the set of numbers k>=0 such that all (3^n+k)*2^n-1 are prime but only the last (largest) (3^n+k)*2^n+1 is also an associated twin prime.

Original entry on oeis.org

1, 3, 2, 5, 16, 2, 2, 18, 2, 8, 8, 10, 14, 9, 5, 43, 15, 1, 56, 13, 5, 151, 7, 20, 107, 3, 30, 8, 16, 31, 8, 21, 3, 103, 57, 38, 28, 37, 99, 5, 15, 50, 87, 31, 67, 107, 1, 113, 69, 12, 41, 19, 23, 43, 150, 100, 49, 76, 3, 159, 48, 86, 49, 81, 62, 48, 118, 66
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Starting at a count of zero, we consider for increasing k>=0 the pairs (3^n+k)*2^n+-1. If the smaller of these two numbers is prime, we increase the counter. If the larger of these two numbers is also prime, we admit the counter to the sequence. It is basically a measure of how many unsuccessful primality tests on the larger of the two numbers are done before it becomes a compatible twin prime.

Crossrefs

A214499 The size of the set of numbers k>=0 such that all (3^n-k)*3^n-1 are prime but only the last (largest) (3^n-k)*3^n+1 is also an associated twin prime.

Original entry on oeis.org

1, 1, 4, 4, 1, 1, 2, 3, 4, 6, 4, 6, 4, 11, 3, 10, 6, 9, 4, 18, 30, 16, 8, 29, 5, 32, 21, 15, 45, 5, 97, 10, 36, 3, 33, 35, 55, 20, 54, 25, 30, 30, 36, 8, 38, 30, 16, 6, 3, 20, 10, 35, 36, 2, 84, 20, 52, 85, 25, 25, 70, 46, 15, 53, 6, 103, 11, 27, 87, 15, 42, 14
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Starting at a count of zero, we consider for increasing k>=0 the pairs (3^n-k)*3^n+-1. If the smaller of these two numbers is prime, we increase the counter. If the larger of these two numbers is also prime, we admit the counter to the sequence. It is basically a measure of how many unsuccessful primality tests on the larger of the two numbers are done before it becomes a compatible twin prime.
Heuristically, the average of a(n)/n over n=1 to N tends to 0.83 as N increases.

Crossrefs

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.

Original entry on oeis.org

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
Offset: 4

Views

Author

Pierre CAMI, Jul 14 2012

Keywords

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.

Crossrefs

Programs

  • 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
  • PFGW
    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

A214500 The size of the set of numbers k>=0 such that all (3^n+k)*3^n-1 are prime but only the last (largest) (3^n+k)*3^n+1 is also an associated twin prime.

Original entry on oeis.org

1, 2, 1, 2, 3, 3, 9, 3, 4, 1, 8, 20, 4, 10, 24, 8, 17, 9, 28, 16, 19, 6, 33, 19, 12, 5, 49, 27, 25, 26, 10, 91, 143, 9, 41, 14, 36, 11, 34, 26, 28, 10, 50, 7, 12, 11, 8, 27, 13, 4, 44, 138, 50, 10, 45, 21, 51, 84, 65, 48, 39, 139, 36, 19, 22, 85, 113, 105, 5, 36
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Starting at a count of zero, we consider for increasing k>=0 the pairs (3^n+k)*3^n+-1. If the smaller of these two numbers is prime, we increase the counter. If the larger of these two numbers is also prime, we admit the counter to the sequence. It is basically a measure of how many unsuccessful primality tests on the larger of the two numbers are done before it becomes a compatible twin prime.
Heuristically, the average of a(n)/n over n=1 to N tends to 0.83 as N increases.

Crossrefs

Showing 1-5 of 5 results.