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.

A377724 Smallest k such that 4^(5*4^n) - k is a safe prime.

Original entry on oeis.org

5, 437, 13709, 40169, 574133
Offset: 0

Views

Author

J.W.L. (Jan) Eerland, Nov 05 2024

Keywords

Comments

a(5) > 2*10^7. - Michael S. Branicky, Nov 09 2024

Crossrefs

Programs

  • Mathematica
    Table[m = 4;
     k = 0; Monitor[
      Parallelize[
       While[True,
        If[And[PrimeQ[m^((m + 1)*m^n) - k],
          PrimeQ[((m^((m + 1)*m^n) - k) - 1)/2]], Break[]]; k++]; k],k], {n, 0, 5}]
  • PARI
    a(n) = {my(k=0); while (!(isprime(p=4^(5*4^n) - k) && isprime((p-1)/2)), k++); k;}
    
  • Python
    from sympy import isprime, prevprime
    def A(n):
        m = 4**(5*4**n)
        p = prevprime(m)
        while not isprime((p-1)//2):
            p = prevprime(p)
        return m-p #