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!)
A231776 Least positive integer k <= n with (2^k + k) * n - 1 prime, or 0 if such a number k does not exist. 2

%I #21 Aug 10 2019 14:51:38

%S 1,1,2,1,2,1,2,1,2,1,6,2,10,1,2,1,2,1,2,1,4,2,2,1,2,8,6,1,2,1,4,2,2,1,

%T 8,1,4,1,2,2,14,2,2,1,2,1,2,6,2,1,4,2,2,3,8,1,6,1,2,1,8,5,4,1,2,1,2,6,

%U 42,2,6,2,4,2,2,1,2,1,4,1,4,2,8,1,2,1,2,1,6,1,8,20,2,1,2,6,10,1,2,2

%N Least positive integer k <= n with (2^k + k) * n - 1 prime, or 0 if such a number k does not exist.

%C We find that 75011 is the only value of n <= 10^5 with a(n) = 0. The least positive integer k with (2^k + k)*75011 - 1 prime is 81152.

%H Zhi-Wei Sun, <a href="/A231776/b231776.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 2 since (2^1 + 1) * 3 - 1 = 8 is not prime, but (2^2 + 2) * 3 - 1 = 17 is prime.

%t Do[Do[If[PrimeQ[(2^k+k)*n-1],Print[n," ",k];Goto[aa]],{k,1,n}]; Print[n," ",0];Label[aa];Continue,{n,1,100}]

%t lpi[n_]:=Module[{k=1},While[!PrimeQ[n(2^k+k)-1],k++];k]; Array[lpi,100] (* _Harvey P. Dale_, Aug 10 2019 *)

%Y Cf. A000040, A000079, A231201, A231557, A231561, A231725.

%K nonn

%O 1,3

%A _Zhi-Wei Sun_, Nov 13 2013

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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)