|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MAPLE
|
a:= proc(n) option remember; `if`(n=1, 1,
parse(cat(convert(n, binary), a(n-1))))
end:
|
|
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)
(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).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|