Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A164022
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A164022 a(n) = the smallest prime that, when written in binary, starts with the substring of n in binary. +0
2
2, 2, 3, 17, 5, 13, 7, 17, 19, 41, 11, 97, 13, 29, 31, 67, 17, 37, 19, 41, 43, 89, 23, 97, 101, 53, 109, 113, 29, 61, 31, 131, 67, 137, 71, 73, 37, 307, 79, 163, 41, 337, 43, 89, 181, 373, 47, 97, 197, 101, 103, 211, 53, 109, 223, 113, 229, 233, 59, 241, 61, 251, 127, 257 (list; graph; listen)
OFFSET

1,1

EXAMPLE

4 in binary is 100. Looking at the binary numbers that begin with 100: 100 = 4 in decimal is composite; 1000 = 8 in decimal is composite; 1001 = 9 in decimal is composite; 10000 = 16 in decimal is composite. But 10001 = 17 in decimal is prime. So a(4) = 17.

MAPLE

A164022 := proc(n) dgs2 := convert(n, base, 2) ; ldgs := nops(dgs2) ; for i from 1 do p := ithprime(i) ; if p >= n then pdgs := convert(p, base, 2) ; if [op(nops(pdgs)+1-ldgs.. nops(pdgs), pdgs)] = dgs2 then RETURN( p) ; fi; fi; od: end: seq(A164022(n), n=1..120) ; [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 13 2009]

CROSSREFS

Cf. A164023

Sequence in context: A153938 A060790 A109843 this_sequence A089751 A137909 A035796

Adjacent sequences: A164019 A164020 A164021 this_sequence A164023 A164024 A164025

KEYWORD

base,nonn

AUTHOR

Leroy Quet (q1qq2qqq3qqqq(AT)yahoo.com), Aug 08 2009

EXTENSIONS

Corrected terms a(1) and a(2) (with help from Ray Chandler) Leroy Quet (q1qq2qqq3qqqq(AT)yahoo.com), Aug 16 2009

Extended by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 13 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 11 12:57 EST 2009. Contains 170656 sequences.


AT&T Labs Research