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!)
A102748 a(n) is the least k such that (2^n)*(10^k) -1 or +1 is prime. 0

%I #7 Aug 28 2021 04:48:21

%S 0,0,0,0,0,0,1,0,0,1,4554,1,1,0,1,2,0,0,2,0,2,2,3,6,1,12,21,14,4,5,74,

%T 0,3,2,5,12,7,2,1,5,16,3,1870,5,24,22,10,1,22,20,2,19,10,1,1,1196,9,4,

%U 10,29,34,0,2,187,3,46,29,62,62,22,2622,1,38,2,1,172

%N a(n) is the least k such that (2^n)*(10^k) -1 or +1 is prime.

%C For n even >2 the least prime is of the form (2^n)*(10^k)+1. For n odd >2 the least prime is of the form (2^n)*(10^k)-1 Mersenne-primes are in the sequence with a(n)=0 and n prime.

%e (2^0)*(10^0)+1 = 2 prime so a(0) = 0.

%e (2^1)*(10^0)+1 = 3 prime so a(1) = 0.

%e (2^2)*(10^0)-1 = 3 prime as (2^2)*(10^0)+1 = 5 prime so a(2) = 0.

%t a[n_] := Module[{k=0}, While[!PrimeQ[2^n*10^k - 1] && !PrimeQ[2^n*10^k + 1], k++]; k]; Array[a, 10, 0] (* _Amiram Eldar_, Aug 28 2021 *)

%K nonn

%O 0,11

%A _Pierre CAMI_, Feb 09 2005

%E More terms from _Amiram Eldar_, Aug 28 2021

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 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)