login
A300570
a(n) is the concatenation n in base 2, n-1 in base 2, ..., 1 in base 2.
3
1, 101, 11101, 10011101, 10110011101, 11010110011101, 11111010110011101, 100011111010110011101, 1001100011111010110011101, 10101001100011111010110011101, 101110101001100011111010110011101, 1100101110101001100011111010110011101
OFFSET
1,2
MAPLE
a:= proc(n) option remember; `if`(n=1, 1,
parse(cat(convert(n, binary), a(n-1))))
end:
seq(a(n), n=1..12); # Alois P. Heinz, Feb 19 2023
MATHEMATICA
Table[FromDigits[Flatten[IntegerDigits[#, 2]&/@Range[n, 1, -1]]], {n, 20}] (* Harvey P. Dale, Sep 07 2020 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
s = ""
for k in count(1):
s = bin(k)[2:] + s
yield int(s)
print(list(islice(agen(), 15))) # Michael S. Branicky, Feb 19 2023
(Python)
from functools import reduce
def A300570(n): return int(bin(reduce(lambda i, j:(i<<j.bit_length())+j, range(n, 0, -1)))[2:]) # Chai Wah Wu, Feb 26 2023
CROSSREFS
Cf. A098780 (decimal expansion of terms).
Sequence in context: A138148 A138831 A267920 * A171825 A267937 A185893
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Mar 08 2018
STATUS
approved