This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A208241 Smallest prime greater than n, with n as prefix in binary representation. 5
 2, 5, 7, 17, 11, 13, 29, 17, 19, 41, 23, 97, 53, 29, 31, 67, 71, 37, 79, 41, 43, 89, 47, 97, 101, 53, 109, 113, 59, 61, 127, 131, 67, 137, 71, 73, 149, 307, 79, 163, 83, 337, 173, 89, 181, 373, 191, 97, 197, 101, 103, 211, 107, 109, 223, 113, 229, 233, 239 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS A208238(n) <= a(n); A174332(n) = a(A000040(n)). LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 MAPLE A208241 := proc(n)     local nbin, len, suf, sufbin, pbin, p ;     nbin := convert(n, base, 2) ;     for len from 1 do         for suf from 0 to 2^len-1 do             sufbin := convert(suf, base, 2) ;             while nops(sufbin) < len do                 sufbin := [op(sufbin), 0] ;             end do:             pbin := [op(sufbin), op(nbin)] ;             p := add( 2^(i-1)*op(i, pbin), i=1..nops(pbin) ) ;             if isprime(p) then                 return p ;             end if;         end do:     end do: end proc: seq(A208241(n), n=1..50) ; # R. J. Mathar, May 06 2017 PROG (Haskell) import Data.List (genericIndex, find, isPrefixOf) import Data.Maybe (fromJust) a208241 = genericIndex a208241_list a208241_list = f nns \$ filter ((== 1) . a010051' . fst) nns where    f mms'@((m, ms):mms) pps'@((p, ps):pps) =      if m == p then f mms' pps else q : f mms pps'      where q = fst \$ fromJust \$ find ((ms `isPrefixOf`) . snd) pps'    nns = zip [1..] \$ map reverse \$ tail a030308_tabf CROSSREFS Cf. A208238, A004676, A007088, A010051, A030308, A055011. Sequence in context: A181447 A082088 A075881 * A089727 A113514 A145674 Adjacent sequences:  A208238 A208239 A208240 * A208242 A208243 A208244 KEYWORD nonn,base AUTHOR Reinhard Zumkeller, Feb 14 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 21 17:46 EDT 2019. Contains 327273 sequences. (Running on oeis4.)