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.

Previous Showing 11-12 of 12 results.

A227230 Numbers k such that 3*2^k + {5,7} are twin primes.

Original entry on oeis.org

1, 2, 3, 5, 6, 19, 22
Offset: 1

Views

Author

Zak Seidov, Sep 20 2013

Keywords

Comments

No more terms up to 10^4.
Any subsequent terms exceed 200,000. - Lucas A. Brown, Sep 02 2024
Any subsequent terms exceed 10^6, by non-primality of 3*2^k+7 for members of b-file at A057913 > 22 and table in Section 6 of Grantham and Granville link. - Michael S. Branicky, Sep 07 2024

Crossrefs

Intersection of A057913 and A059746. - Jason Yuen, Sep 02 2024

Programs

  • Mathematica
    Reap[Do[If[PrimeQ[a=3*2^n+5]&&PrimeQ[a+2],Sow[n]],{n,150}]][[2,1]]
  • PARI
    for(k = 1,10^4, if(ispseudoprime(a = 3*2^k + 5)&&ispseudoprime (a + 2), print1(k",")))

A386857 Numbers k such that both 9*2^k - 1 and 9*2^k + 1 are prime.

Original entry on oeis.org

1, 3, 7, 43, 63, 211
Offset: 1

Views

Author

Ken Clements, Aug 05 2025

Keywords

Comments

The exponent, k, of 2 must be odd because the exponent, 2, of 3 (where 9 = 3^2) is even and the sum of the exponents of prime factors 2 and 3 must be odd to form a product that is a twin prime average. Of all subsequences of A027856, this is the longest known where the power of 3 is fixed.
Amiram Eldar noted that using A002236 and A002256, we obtain a(7) > 5.6*10^6, if it exists.

Examples

			a(1) = 1 because 2*9 = 18 with 17 and 19 prime.
a(2) = 3 because 8*9 = 72 with 71 and 73 prime.
a(3) = 7 because 128*9 = 1152 with 1151 and 1153 prime.
a(4) = 43 because 8796093022208*9 = 79164837199872 with 79164837199871 and 79164837199873 prime.
		

Crossrefs

Intersection of A002236 and A002256.

Programs

  • Maple
    q:= k-> (m-> andmap(isprime, [m-1, m+1]))(9*2^k):
    select(q, [2*i-1$i=1..111])[];  # Alois P. Heinz, Aug 08 2025
  • Python
    from gmpy2 import is_prime
    def is_TPpi2(e2, e3):
        N = 2**e2 * 3**e3
        return is_prime(N-1) and is_prime(N+1)
    print([k for k in range(1, 100001, 2) if is_TPpi2(k, 2)])
Previous Showing 11-12 of 12 results.