The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A105888 a(n) = the smallest prime that, when written in binary, ends with the substring of 2n-1 in binary. 2
 3, 3, 5, 7, 41, 11, 13, 31, 17, 19, 53, 23, 89, 59, 29, 31, 97, 163, 37, 103, 41, 43, 109, 47, 113, 179, 53, 311, 313, 59, 61, 127, 193, 67, 197, 71, 73, 331, 461, 79, 337, 83, 853, 599, 89, 347, 349, 223, 97, 227, 101, 103, 233, 107, 109, 239, 113, 499, 373, 503, 761 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Rémy Sigrist, Table of n, a(n) for n = 1..8192 EXAMPLE 2*5-1 = 9 is 1001 in binary. Looking at the binary numbers that end with 1001: 1001 = 9 in decimal is composite; 11001 = 25 in decimal is composite. But 101001 = 41 in decimal is prime. So a(5) = 41. - Corrected by Rémy Sigrist, Feb 05 2020 MAPLE isA105888 := proc(p, n) local pdgs, n21dgs ; pdgs := convert(p, base, 2) ; n21dgs := convert(2*n-1, base, 2) ; if nops(n21dgs) > nops(pdgs) then return false; else verify( [op(1..nops(n21dgs), n21dgs)], [op(1..nops(n21dgs), pdgs)], 'sublist') ; end if; end proc: A105888 := proc(n) p := 2 ; while not isA105888(p, n) do p := nextprime(p) ; end do ; p ; end proc: seq(A105888(n), n=1..80) ; # R. J. Mathar, Dec 06 2009 MATHEMATICA pr=-16; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &] PROG (PARI) a(n) = my (m=2*n-1); forstep (p=m, oo, 2^#binary(m), if (isprime(p), return (p))) CROSSREFS Cf. A164022. Sequence in context: A147095 A161626 A217648 * A335679 A123632 A039868 Adjacent sequences: A105885 A105886 A105887 * A105889 A105890 A105891 KEYWORD base,nonn AUTHOR Leroy Quet, Aug 08 2009 EXTENSIONS Extended beyond a(10) by R. J. Mathar, Dec 06 2009 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.

Last modified May 27 23:25 EDT 2023. Contains 362992 sequences. (Running on oeis4.)