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!)
A162213 a(n) = the smallest positive multiple of n with exactly n digits when written in binary. 3

%I #18 Nov 06 2017 02:52:05

%S 1,2,6,8,20,36,70,128,261,520,1034,2052,4108,8204,16395,32768,65552,

%T 131076,262162,524300,1048593,2097172,4194326,8388624,16777225,

%U 33554456,67108878,134217748,268435484,536870940,1073741854,2147483648

%N a(n) = the smallest positive multiple of n with exactly n digits when written in binary.

%H Alois P. Heinz, <a href="/A162213/b162213.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = n * ceiling(2^(n-1)/n). - _Alois P. Heinz_, Jul 11 2009

%p a := proc (n) local k: for k while nops(convert(k*n, base, 2)) <> n do end do; k*n end proc: seq(a(n), n = 1 .. 24); # _Emeric Deutsch_, Jul 10 2009

%p a:= n-> n*ceil(2^(n-1)/n): seq(a(n), n=1..40); # _Alois P. Heinz_, Jul 11 2009

%t Array[# Ceiling[2^(# - 1)/#] &, 32] (* _Michael De Vlieger_, Nov 04 2017 *)

%Y Cf. A162214, A053041.

%K base,nonn,easy

%O 1,2

%A _Leroy Quet_, Jun 28 2009

%E More terms from _Emeric Deutsch_ and _Alois P. Heinz_, Jul 11 2009

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 April 18 03:33 EDT 2024. Contains 371767 sequences. (Running on oeis4.)