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.

A247147 Numbers k such that 3*k-4 and 2^k-1 are prime.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 31, 61, 89, 107, 521, 1279, 9689, 9941, 21701, 23209, 216091, 13466917, 30402457, 57885161
Offset: 1

Views

Author

Vincenzo Librandi, Nov 21 2014

Keywords

Comments

All terms are primes.

Crossrefs

Programs

  • Magma
    [n: n in [0..10000] | IsPrime(3*n-4) and IsPrime(2^n-1)];
    
  • Mathematica
    Select[Range[10000], PrimeQ[2^# - 1] && PrimeQ[3 # - 4] &]
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(startk=1):
        for k in count(startk):
            if isprime(3*k-4) and isprime(2**k-1):
                yield k
    print(list(islice(agen(), 12))) # Michael S. Branicky, Jul 31 2022

Extensions

a(20) using A000043 from Michael S. Branicky, Jul 31 2022