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.

A181356 Smallest k such that 2^(2^n) - k is a safe prime.

This page as a plain text file.
%I A181356 #26 Aug 24 2025 16:35:29
%S A181356 5,29,269,209,1469,15449,36113,38117,1093337,1942289,10895177,
%T A181356 43644929,364486013,718982153,2356107437
%N A181356 Smallest k such that 2^(2^n) - k is a safe prime.
%C A181356 These numbers are useful as Diffie-Hellman moduli.
%H A181356 Mersenne Forum, <a href="http://www.mersenneforum.org/showthread.php?t=16124">CRUS-like sieving challenge</a>
%e A181356 a(2)=5 because 2^(2^2) - 5 = 11 is the largest safe prime less than 16.
%o A181356 (PARI) a(n) = {k = 1; pow2 = 2^(2^n); while (! (isprime(pow2 - k) && isprime((pow2 - k - 1)/2)), k +=2;); k;} \\ _Michel Marcus_, Aug 16 2013
%Y A181356 Cf. A058220, A005385, A057821, A335313.
%K A181356 nonn,more,hard,changed
%O A181356 2,1
%A A181356 _Ken Takusagawa_, Jan 27 2011
%E A181356 a(14) from _Ken Takusagawa_, May 31 2011
%E A181356 a(15) from _Gary Barnes_, Oct 26 2011
%E A181356 a(16) from _Mark Andreas_, Jan 23 2023