login
A371108
Integers whose ternary representation consists of 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
15, 42, 45, 51, 123, 126, 132, 135, 153, 159, 366, 369, 375, 378, 396, 402, 405, 420, 459, 477, 483, 1095, 1098, 1104, 1107, 1125, 1131, 1134, 1149, 1188, 1206, 1212, 1215, 1230, 1257, 1260, 1266, 1377, 1392, 1431, 1449, 1455, 3282, 3285, 3291, 3294, 3312
OFFSET
1,1
COMMENTS
a(n) is a multiple of 3 for every n.
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, DeleteDuplicates[Partition[Map[#[[1]] &, Split[IntegerDigits[#, 3]]], UpTo[3]]] == {{1, 2, 0}}} &,
Range[3, 3600, 3]], #[[2]] &]] (* A371107 *)
m = Map[{#, IntegerString[#, 3]} &, %];
Map[Last, ToExpression[m]] (* this sequence *)
(* Peter J. C. Moses, Mar 06 2024 *)
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 22 2024
STATUS
approved