cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A162213 #18 Nov 06 2017 02:52:05
%S A162213 1,2,6,8,20,36,70,128,261,520,1034,2052,4108,8204,16395,32768,65552,
%T A162213 131076,262162,524300,1048593,2097172,4194326,8388624,16777225,
%U A162213 33554456,67108878,134217748,268435484,536870940,1073741854,2147483648
%N A162213 a(n) = the smallest positive multiple of n with exactly n digits when written in binary.
%H A162213 Alois P. Heinz, <a href="/A162213/b162213.txt">Table of n, a(n) for n = 1..1000</a>
%F A162213 a(n) = n * ceiling(2^(n-1)/n). - _Alois P. Heinz_, Jul 11 2009
%p A162213 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 A162213 a:= n-> n*ceil(2^(n-1)/n): seq(a(n), n=1..40); # _Alois P. Heinz_, Jul 11 2009
%t A162213 Array[# Ceiling[2^(# - 1)/#] &, 32] (* _Michael De Vlieger_, Nov 04 2017 *)
%Y A162213 Cf. A162214, A053041.
%K A162213 base,nonn,easy
%O A162213 1,2
%A A162213 _Leroy Quet_, Jun 28 2009
%E A162213 More terms from _Emeric Deutsch_ and _Alois P. Heinz_, Jul 11 2009