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”).

A371105
Ternary numbers that are concatenated runs A(1)B(1)C(1)A(2)B(2)C(2)...A(k)B(k)C(k), where A(i) is a run of 1's, B(i) a run of 0's, and C(i) a run of 2's, for i = 1..k.
7
102, 1002, 1022, 1102, 10002, 10022, 10222, 11002, 11022, 11102, 100002, 100022, 100222, 102102, 102222, 110002, 110022, 110222, 111002, 111022, 111102, 1000002, 1000022, 1000222, 1002102, 1002222, 1021002, 1021022, 1021102, 1022102, 1022222, 1100002
OFFSET
1,1
EXAMPLE
1021002 has the form A(1)B(1)C(1)A(2)B(2)C(2), where A(1) = 1, B(1) = 0, C(1)=2, A(2)= 1, B(2) = 00, and C(2) = 2.
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, DeleteDuplicates[Partition[Map[#[[1]] &, Split[IntegerDigits[#, 3]]], UpTo[3]]] == {{1, 0, 2}}} &,
Range[2, 2800, 3]], #[[2]] &]] (* this sequence *)
m = Map[{#, IntegerString[#, 3]} &, %];
Map[Last, ToExpression[m]] (* A371106 *)
(* Peter J. C. Moses, Mar 06 2024 *)
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 22 2024
STATUS
approved