login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350696 a(n) is the least nonnegative integer k such that 2^n + k is a safe prime. 3
1, 3, 7, 15, 19, 39, 7, 51, 163, 15, 31, 231, 103, 75, 7, 195, 499, 99, 127, 627, 955, 555, 691, 87, 679, 99, 1411, 351, 799, 135, 91, 771, 79, 951, 667, 975, 1183, 1311, 667, 315, 955, 759, 2011, 9315, 4243, 1575, 907, 1527, 3943, 2091, 1927, 75, 1879 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
2^n+a(n) is the smallest (n+1)-bit safe prime.
LINKS
EXAMPLE
a(6)=19 because 2^6+19=83 is the smallest safe prime greater than 64 of the form p=2q+1 where p and q are both primes.
MATHEMATICA
safeQ[p_] := And @@ PrimeQ[{p, (p - 1)/2}]; a[n_] := Module[{k = 2^n + 1}, While[! safeQ[k], k++]; k -= 2^n]; Array[a, 50, 2] (* Amiram Eldar, Jan 12 2022 *)
PROG
(PARI) a(n) = {my(k=0); until (isprime(2^n+k) && isprime((2^n+k-1)/2), k++); return (k); }
CROSSREFS
Sequence in context: A075694 A186300 A323650 * A144751 A138847 A235699
KEYWORD
nonn
AUTHOR
Mark Andreas, Jan 12 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 09:05 EDT 2024. Contains 372020 sequences. (Running on oeis4.)