login
A380372
Characteristic function of A082851.
2
1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0
OFFSET
1
COMMENTS
This sequence is the limit S(infinity) of replications starting S(0) = {} and then S(k) = {S(k-1), S(k-1), 0,0,…,0,1} where the 0,...,0,1 run is k terms long (k-1 0's followed by a 1).
Runs of terms 0,...,0,1 have lengths A082850.
EXAMPLE
The S construction of for instance S(3), which is terms a(1) to a(11), is
S(3) = 1,1,0,1, 1,1,0,1, 0,0,1
\-----/ \-----/ \---/
S(2) S(2) run of 3
Runs of 0,...,0,1 with lengths A082850 begin
sequence = 1, 1, 0,1, 1, 1, 0,1, 0,0,1, ...
A082850 = 1 1 2 1 1 2 3
MATHEMATICA
Fold[Flatten[{#, #, PadLeft[{1}, #2]}] &, {}, Range[6]] (* Paolo Xausa, Feb 10 2025 *)
PROG
(Python)
from itertools import count, islice
def A380372_gen():
S = []
for n in count(1):
yield from (m:=S+[0]*(n-1)+[1])
S += m
A380372 = list(islice(A380372_gen(), 100))
CROSSREFS
Sequence in context: A249066 A176178 A267778 * A379952 A285384 A165728
KEYWORD
nonn,new
AUTHOR
Jwalin Bhatt, Jan 23 2025
STATUS
approved