OFFSET
1,2
COMMENTS
MAPLE
a:= n-> parse(cat(map(t-> convert(t, binary), [$1..n, n-i$i=1..n-1])[])):
seq(a(n), n=1..10); # Alois P. Heinz, Feb 18 2023
MATHEMATICA
a[n_] := FromDigits @ Flatten @ IntegerDigits[Join[Range[1, n], Range[n - 1, 1, -1]], 2]; Array[a, 10] (* Amiram Eldar, Feb 18 2023 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
sl, sr, sk = "", "", "1"
for k in count(1):
sk = bin(k)[2:]
sl += sk
yield int(sl + sr)
sr = sk + sr
print(list(islice(agen(), 10))) # Michael S. Branicky, Feb 18 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Feb 18 2023
STATUS
approved