[go: up one dir, main page]

login
A355328
Decimal expansion of the number whose binary expansion differs from its decimal expansion only in the first digit.
1
1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1
OFFSET
0,1
COMMENTS
The decimal fraction 0.1 has binary expansion starting with 0.0001...; copying the suffix 001 (3 digits, as 3 < log_2(10) < 4) we obtain 0.1001, which expands to 0.00011001101, etc.
Alternatively the process can be described as greedily expressing 1/2 with digits of weights 1/2^n-1/10^n. With f(n)=1/2^n-1/10^n, 0.5 = f(1)+f(4)+f(5)+f(8)+f(9)+f(11)...
EXAMPLE
0.100110011010000011001111010001110100101001000111010001001101001011...
MATHEMATICA
seq[len_] := Module[{s = Table[0, {len}], x = 1/10, n = 1, c = 0}, s[[1]] = 1; While[n < len, While[1/2^n - 1/10^n > x, n++]; c++; s[[n]] = 1; x -= (1/2^n - 1/10^n)]; s]; seq[100] (* Amiram Eldar, Jun 29 2022 *)
CROSSREFS
Cf. A352677 (golden base = binary).
Sequence in context: A188083 A102560 A190669 * A285258 A068428 A373155
KEYWORD
nonn,cons
AUTHOR
Leonid Broukhis, Jun 29 2022
STATUS
approved