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.

This page as a plain text file.
%I A377724 #13 Nov 14 2024 08:23:28
%S A377724 5,437,13709,40169,574133
%N A377724 Smallest k such that 4^(5*4^n) - k is a safe prime.
%C A377724 a(5) > 2*10^7. - _Michael S. Branicky_, Nov 09 2024
%t A377724 Table[m = 4;
%t A377724  k = 0; Monitor[
%t A377724   Parallelize[
%t A377724    While[True,
%t A377724     If[And[PrimeQ[m^((m + 1)*m^n) - k],
%t A377724       PrimeQ[((m^((m + 1)*m^n) - k) - 1)/2]], Break[]]; k++]; k],k], {n, 0, 5}]
%o A377724 (PARI) a(n) = {my(k=0); while (!(isprime(p=4^(5*4^n) - k) && isprime((p-1)/2)), k++); k;}
%o A377724 (Python)
%o A377724 from sympy import isprime, prevprime
%o A377724 def A(n):
%o A377724     m = 4**(5*4**n)
%o A377724     p = prevprime(m)
%o A377724     while not isprime((p-1)//2):
%o A377724         p = prevprime(p)
%o A377724     return m-p #
%Y A377724 Cf. A005385, A057821, A181356, A335313, A376946.
%K A377724 nonn,more
%O A377724 0,1
%A A377724 _J.W.L. (Jan) Eerland_, Nov 05 2024