login
A100129
Numbers k such that 2^k starts with k.
12
6, 10, 1542, 77075, 113939, 1122772, 2455891300, 2830138178, 136387767490, 2111259099790, 3456955336468, 4653248164310, 10393297007134, 321249146279171, 972926121017616, 72780032758751764, 2360165090985064742
OFFSET
1,1
COMMENTS
According to van de Lune, Erdős observed that 2^6 = 64 and 2^10 = 1024 were two examples where the decimal expansion of 2^k starts with that of k. At that time no other examples were known. Jan van de Lune computed the first 6 terms in 1978. - Juan Arias-de-Reyna, Feb 12 2016
LINKS
J. van de Lune, A note on a problem of Erdős, Department of Pure Mathematics, ZW 87/78, Mathematisch Centrum, Amsterdam 1978, 1-3.
FORMULA
The sequence contains k if and only if 0 <= {k*log_10(2)} - {log_10(k)} < log_10(k+1) - log_10(k), where {x} denotes the fractional part of x. See the van de Lune article. - David Radcliffe, Jun 02 2019
EXAMPLE
2^6 = 64, which begins with 6;
2^10 = 1024, which begins with 10.
MATHEMATICA
f[n_] := Floor[ 10^Floor[ Log[10, n]](10^FractionalPart[n*N[ Log[10, 2], 24]])]; Do[ If[ f[n] == n, Print[n]], {n, 125000000}] (* Robert G. Wilson v, Nov 16 2004 *)
PROG
(Python) # Caveat: fails for large n due to rounding error.
from math import log10 as log
frac = lambda x: x - int(x)
is_a100129 = lambda n: 0 <= frac(n * log(2)) - frac(log(n)) < log(n + 1) - log(n) # David Radcliffe, Jun 02 2019
(Python)
from itertools import count, islice
def A100129_gen(startvalue=1): # generator of terms
a = 1<<(m:=max(startvalue, 1))
for n in count(m):
if (s:=str(n))==str(a)[:len(s)]:
yield n
a <<= 1
A100129_list = list(islice(A100129_gen(), 4)) # Chai Wah Wu, Apr 10 2023
CROSSREFS
b^k starts with k: A131493 (b=pi), A131494 (b=e), A100129 (b=2), A362096 (b=3), A320930 (b=4), A362097 (b=5), A362098 (b=6), A362099 (b=7), A362100 (b=8), A362101 (b=9).
Cf. A064541 (2^k ending with k), A032740 (k a substring of 2^k), A033147, A131495.
Sequence in context: A268537 A115677 A284738 * A009443 A258054 A106540
KEYWORD
nonn,base
AUTHOR
Mark Hudson (mrmarkhudson(AT)hotmail.com), Nov 15 2004
EXTENSIONS
a(5)-a(6) from Robert G. Wilson v, Nov 16 2004
a(7)-a(16) from Robert Gerbicz, Aug 22 2006
a(17) from Max Alekseyev, Nov 08 2025
STATUS
approved