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.

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

Original entry on oeis.org

1, 3, 3, 7, 21, 29, 113, 31, 61, 13, 179, 237, 33, 201, 613, 171, 347, 291, 907, 437, 523, 193, 1039, 729, 567, 231, 1847, 931, 1023, 821, 329, 3937, 6137, 319, 1663, 667, 1837, 529, 1769, 1959, 1781, 743, 3223, 591, 613, 473, 5679, 2137, 567, 459, 4729
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Conjecture : there is always one such k for each n>0.
Heuristically, as N increases, the average of a(n)/n^2 for n=1 to N tends to 1.2

Crossrefs

Cf. A214495.

Programs

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

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

Original entry on oeis.org

0, 6, 3, 9, 9, 6, 3, 93, 3, 54, 18, 96, 213, 297, 1206, 258, 312, 201, 261, 1206, 1158, 396, 1062, 216, 708, 762, 816, 678, 3579, 762, 831, 2106, 4734, 576, 333, 633, 213, 2766, 363, 2454, 1464, 2007, 4551, 3183, 1497, 4899, 198, 66, 9984, 2847, 276, 3051
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Conjecture : there is always one such k for each n>0.
As N increases, the average of a(n)/n^2 over n=1 to N appears to approach 1.1

Crossrefs

Programs

  • Maple
    A214497 := proc(n)
        local k;
        for k from 0 do
            p := (3^n-k)*2^n-1 ;
            if isprime(p) and isprime(p+2) then
                return k;
            end if;
        end do:
    end proc:
    seq(A214497(n),n=1..80) ; # R. J. Mathar, Jul 23 2012
  • Mathematica
    sk[n_]:=Module[{k=0,c},c=(3^n-k)2^n;While[!PrimeQ[c-1] || !PrimeQ[c+1],k++;c=(3^n-k)2^n];k]; Array[sk,60] (* Harvey P. Dale, Dec 09 2012 *)

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

Original entry on oeis.org

0, 6, 3, 12, 78, 18, 18, 141, 18, 54, 78, 132, 138, 78, 57, 537, 237, 6, 972, 219, 81, 3369, 69, 501, 2328, 18, 738, 291, 393, 969, 324, 492, 102, 3291, 1788, 1401, 891, 954, 4017, 309, 702, 1656, 3999, 1014, 2346, 4008, 3, 5001, 2736, 558, 2262, 969, 762
Offset: 1

Views

Author

Pierre CAMI, Jul 20 2012

Keywords

Comments

Conjecture : there is always one such k for each n>0.
Heuristically, the average of a(n)/n^2 over n=1 to N tends to 1.2 as N increases.

Crossrefs

Programs

  • Maple
    A214498 := proc(n)
        local k;
        for k from 0 do
            p := (3^n+k)*2^n-1 ;
            if isprime(p) and isprime(p+2) then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Jul 23 2012
  • Mathematica
    sk[n_]:=Module[{n3=3^n,n2=2^n,k=0},While[!And@@PrimeQ[(n3+k)n2+{1,-1}], k++];k]; Array[sk,60] (* Harvey P. Dale, Jul 23 2013 *)

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

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.