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.

Original entry on oeis.org

5, 29, 269, 209, 1469, 15449, 36113, 38117, 1093337, 1942289, 10895177, 43644929, 364486013, 718982153, 2356107437
Offset: 2

Views

Author

Ken Takusagawa, Jan 27 2011

Keywords

Comments

These numbers are useful as Diffie-Hellman moduli.

Examples

			a(2)=5 because 2^(2^2) - 5 = 11 is the largest safe prime less than 16.
		

Crossrefs

Programs

  • 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

Extensions

a(14) from Ken Takusagawa, May 31 2011
a(15) from Gary Barnes, Oct 26 2011
a(16) from Mark Andreas, Jan 23 2023