A096104 Digit reversal of A096299(n).
1, 11, 21, 111, 211, 221, 321, 1111, 2111, 2211, 3211, 2221, 3221, 3321, 4321, 11111, 21111, 22111, 32111, 22211, 32211, 33211, 43211, 22221, 32221, 33221
Offset: 1
Crossrefs
Cf. A096299.
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
1, 11, 12, 111, 112, 122, 123, 1111, 1112, 1122, 1123, 1222, 1223, 1233, ... The 8 strings of length 4 are 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234. From _Gus Wiseman_, Apr 26 2020: (Start) The triangle read by columns begins: 1:{1} 2:{1,1} 4:{1,1,1} 8:{1,1,1,1} 16:{1,1,1,1,1} 3:{1,2} 5:{1,1,2} 9:{1,1,1,2} 17:{1,1,1,1,2} 6:{1,2,2} 10:{1,1,2,2} 18:{1,1,1,2,2} 7:{1,2,3} 11:{1,1,2,3} 19:{1,1,1,2,3} 12:{1,2,2,2} 20:{1,1,2,2,2} 13:{1,2,2,3} 21:{1,1,2,2,3} 14:{1,2,3,3} 22:{1,1,2,3,3} 15:{1,2,3,4} 23:{1,1,2,3,4} 24:{1,2,2,2,2} 25:{1,2,2,2,3} 26:{1,2,2,3,3} 27:{1,2,2,3,4} 28:{1,2,3,3,3} 29:{1,2,3,3,4} 30:{1,2,3,4,4} 31:{1,2,3,4,5} (End)
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}]; Table[ptnToNorm[stc[n]],{n,15}] (* Gus Wiseman, Apr 26 2020 *)
f:= proc(n) local L,i: L:= convert(n,base,2); add(L[i]*(10^i-1)/9, i=1..nops(L)) end proc: map(f, [$1..100]); # Robert Israel, Feb 03 2025
Nest[Append[#1, 10 #1[[Floor[#2/2] ]] + DigitCount[#2, 2, 1]] & @@ {#, Length[#] + 1} &, {1}, 36] (* Michael De Vlieger, Mar 12 2021 *)
a(n) = sum(k=0, log(n)\log(2), hammingweight(n\(2^k))*10^k); \\ Michel Marcus, May 09 2019
a(n) = my(b = Vecrev(binary(n))); sum(i = 1, #b, b[i] * (10^i-1)) / 9 \\ David A. Corneth, May 19 2019
Comments