login
A371107
Ternary numbers that are concatenated runs A(1)C(1)B(1)A(2)C(2)B(2)...A(k)C(k)B(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
120, 1120, 1200, 1220, 11120, 11200, 11220, 12000, 12200, 12220, 111120, 111200, 111220, 112000, 112200, 112220, 120000, 120120, 122000, 122200, 122220, 1111120, 1111200, 1111220, 1112000, 1112200, 1112220, 1120000, 1120120, 1122000, 1122200, 1122220
OFFSET
1,1
EXAMPLE
111220 has the form A(1)C(1)B(1), where A(1) = 111, B(1) = 0, C(1)=22.
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, DeleteDuplicates[Partition[Map[#[[1]] &, Split[IntegerDigits[#, 3]]], UpTo[3]]] == {{1, 2, 0}}} &,
Range[3, 3600, 3]], #[[2]] &]] (* this sequence *)
m = Map[{#, IntegerString[#, 3]} &, %];
Map[Last, ToExpression[m]] (* A371108 *)
(* Peter J. C. Moses, Mar 06 2024 *)
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 22 2024
STATUS
approved