login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the concatenation n in base 2, n-1 in base 2, ..., 1 in base 2.
3

%I #35 Feb 26 2023 10:31:04

%S 1,101,11101,10011101,10110011101,11010110011101,11111010110011101,

%T 100011111010110011101,1001100011111010110011101,

%U 10101001100011111010110011101,101110101001100011111010110011101,1100101110101001100011111010110011101

%N a(n) is the concatenation n in base 2, n-1 in base 2, ..., 1 in base 2.

%H Seiichi Manyama, <a href="/A300570/b300570.txt">Table of n, a(n) for n = 1..155</a>

%H <a href="/index/Mo#MWP">Index entries for sequences related to Most Wanted Primes video</a>

%p a:= proc(n) option remember; `if`(n=1, 1,

%p parse(cat(convert(n, binary), a(n-1))))

%p end:

%p seq(a(n), n=1..12); # _Alois P. Heinz_, Feb 19 2023

%t Table[FromDigits[Flatten[IntegerDigits[#,2]&/@Range[n,1,-1]]],{n,20}] (* _Harvey P. Dale_, Sep 07 2020 *)

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o s = ""

%o for k in count(1):

%o s = bin(k)[2:] + s

%o yield int(s)

%o print(list(islice(agen(), 15))) # _Michael S. Branicky_, Feb 19 2023

%o (Python)

%o from functools import reduce

%o 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

%Y Cf. A007088, A058935, A300571.

%Y Cf. A098780 (decimal expansion of terms).

%K nonn,base

%O 1,2

%A _Seiichi Manyama_, Mar 08 2018