Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A091936
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A091936 Smallest prime between 2^n and 2^(n+1), having a minimal number of 1's in binary representation. +0
5
2, 5, 11, 17, 37, 67, 131, 257, 521, 1033, 2053, 4099, 8209, 16417, 32771, 65537, 133121, 262147, 524353, 1048609, 2097169, 4194433, 8388617, 16777729, 33554467, 67239937, 134250497, 268435459, 536903681, 1073741827, 2147483713 (list; graph; listen)
OFFSET

1,1

COMMENT

A091935(n) = A000120(a(n)).

So far only a(25) and a(32) possess 4 1's in their binary representation.

MATHEMATICA

NextPrim[ n_] := Block[ {k = n + 1}, While[ !PrimeQ[ k], k++ ]; k]; p = 2; Do[ c = Infinity; While[ p < 2^n, b = Count[ IntegerDigits[ p, 2], 1]; If[ c > b, c = b; q = p]; p = NextPrim[ p]; If[ c < 4, p = NextPrim[ 2^n]; Continue[ ]]]; Print[ q], {n, 2, 32}] (Robert G. Wilson v Feb 18 2004)

b[ n_ ] := Min[ Select[ FromDigits[ #, 2 ] & /@ (Join[ {1}, #, {1} ] & /@ Permutations[ Join[ {1}, Table[ 0, {n - 2} ] ] ]), PrimeQ[ # ] & ] ]; c[ n_ ] := Min[ Select[ FromDigits[ #, 2 ] & /@ (Join[ {1}, #, {1} ] & /@ Permutations[ Join[ {1, 1}, Table[ 0, {n - 3} ] ] ]), PrimeQ[ # ] & ] ]; f[ n_ ] := If[ PrimeQ[ 2^n + 1 ], 2^n + 1, If[ PrimeQ[ b[ n ] ], b[ n ], c[ n ] ] ]; Table[ f[ n ], {n, 2, 32} ] (Robert G. Wilson v)

CROSSREFS

Cf. A091938, A019434.

Adjacent sequences: A091933 A091934 A091935 this_sequence A091937 A091938 A091939

Sequence in context: A027426 A133928 A126204 this_sequence A038977 A141778 A117877

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Feb 14 2004

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com) Feb 18 2004

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 October 13 09:05 EDT 2008. Contains 145008 sequences.


AT&T Labs Research