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!)
A361546 a(n) is the least odd number k such that k*2^prime(n) + 1 is prime, or -1 if no such number k exists. 1
1, 5, 3, 5, 9, 5, 9, 11, 45, 23, 35, 15, 3, 9, 27, 51, 27, 53, 9, 39, 23, 249, 51, 51, 131, 221, 29, 105, 321, 179, 5, 221, 111, 411, 191, 65, 83, 75, 95, 101, 147, 83, 149, 111, 203, 131, 9, 245, 281, 15, 83, 65, 299, 39, 51, 51, 225, 65, 81, 125, 611, 143, 65, 107, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
prime(1) = 2 and 1*2^2 + 1 = 5 is prime, and no lesser odd k satisfies this, so a(1) = 1.
MATHEMATICA
a[n_] := Module[{m = 2^Prime[n], k = 1}, While[!PrimeQ[k*m + 1], k += 2]; k]; Array[a, 65] (* Amiram Eldar, Mar 15 2023 *)
PROG
(PARI) a(n)=my(m=2^prime(n), k=1); while(!isprime(k*m+1), k+=2); k
CROSSREFS
Cf. A076336. Essentially the same as A253398.
Sequence in context: A185046 A114740 A330523 * A128008 A265800 A144386
KEYWORD
nonn
AUTHOR
Jean-Marc Rebert, Mar 15 2023
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 July 7 21:17 EDT 2024. Contains 374148 sequences. (Running on oeis4.)