login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A067488
Powers of 2 with initial digit 1.
19
1, 16, 128, 1024, 16384, 131072, 1048576, 16777216, 134217728, 1073741824, 17179869184, 137438953472, 1099511627776, 17592186044416, 140737488355328, 1125899906842624, 18014398509481984, 144115188075855872, 1152921504606846976, 18446744073709551616
OFFSET
1,2
COMMENTS
Also smallest n-digit power of 2.
For each range 10^(n-1) to 10^n-1 there exists exactly 1 power of 2 with first digit 1 (floor(log_10(a(n))) = n-1). As such, the density of this sequence relative to all powers of 2 (A000079) is log(2)/log(10) (0.301..., A007524), which is prototypical of Benford's Law. - Charles L. Hohn, Jul 23 2024
FORMULA
a(n) = 2^ceiling((n-1)*log(10)/log(2)). - Benoit Cloitre, Aug 29 2002
From Charles L. Hohn, Jun 09 2024: (Start)
a(n) = 2^A067497(n-1).
A055642(a(n)) = n. (End)
MATHEMATICA
Select[2^Range[0, 70], First[IntegerDigits[#]] == 1 &] (* Harvey P. Dale, Mar 14 2011 *)
PROG
(PARI) a(n)=2^ceil((n-1)*log(10)/log(2)) \\ Charles R Greathouse IV, Apr 08 2012
(GAP) Filtered(List([0..60], n->2^n), i->ListOfDigits(i)[1]=1); # Muniru A Asiru, Oct 22 2018
(Scala) (List.fill(50)(2: BigInt)).scanLeft(1: BigInt)(_ * _).filter(_.toString.startsWith("1")) // Alonso del Arte, Jan 16 2020
(Magma) [2^n: n in [0..100] | Intseq(2^n)[#Intseq(2^n)] eq 1]; // Vincenzo Librandi, Dec 31 2024
CROSSREFS
KEYWORD
base,easy,nonn,changed
AUTHOR
Amarnath Murthy, Feb 09 2002
STATUS
approved