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

%I #20 Mar 20 2023 04:42:43

%S 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,

%T 221,29,105,321,179,5,221,111,411,191,65,83,75,95,101,147,83,149,111,

%U 203,131,9,245,281,15,83,65,299,39,51,51,225,65,81,125,611,143,65,107,21

%N 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.

%H Jean-Marc Rebert, <a href="/A361546/b361546.txt">Table of n, a(n) for n = 1..1000</a>

%e prime(1) = 2 and 1*2^2 + 1 = 5 is prime, and no lesser odd k satisfies this, so a(1) = 1.

%t 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 *)

%o (PARI) a(n)=my(m=2^prime(n),k=1);while(!isprime(k*m+1),k+=2);k

%Y Cf. A076336. Essentially the same as A253398.

%K nonn

%O 1,2

%A _Jean-Marc Rebert_, Mar 15 2023

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 31 04:10 EDT 2024. Contains 374774 sequences. (Running on oeis4.)