[go: up one dir, main page]

login
A252488
Binary sequence starting with 1 and with run lengths given by the ruler sequence A001511.
2
1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1
OFFSET
1
COMMENTS
Inspired by Jeremy Gardiner's sequence A253585.
PROG
(PARI) concat(vector(50, n, if(1<m=A001511(n), vector(m), 1)))
(Python 3.10+)
def A252488_gen(): # generator of terms
m = 0
for n in count(0):
yield from [0]*(-m-1+(m:=(n<<2)-n.bit_count()))
yield 1 # Chai Wah Wu, Jul 12 2022
CROSSREFS
The 1's are located at indices given by A005187(2n+1) = A005187(2n)+1 = A120738(n)+1. - N. J. A. Sloane and M. F. Hasler, Jan 22 2015
Sequence in context: A353269 A205633 A352594 * A170956 A293449 A307424
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jan 13 2015
STATUS
approved