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
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, 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, 10, 29, 34, 0, 2, 187, 3, 46, 29, 62, 62, 22, 2622, 1, 38, 2, 1, 172 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
COMMENTS
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.
LINKS
EXAMPLE
(2^0)*(10^0)+1 = 2 prime so a(0) = 0.
(2^1)*(10^0)+1 = 3 prime so a(1) = 0.
(2^2)*(10^0)-1 = 3 prime as (2^2)*(10^0)+1 = 5 prime so a(2) = 0.
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A020432 A186471 A210305 * A032751 A020436 A104947
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 09 2005
EXTENSIONS
More terms from Amiram Eldar, Aug 28 2021
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 March 29 08:08 EDT 2024. Contains 371265 sequences. (Running on oeis4.)