login
A371053
Ternary numbers consisting of a run of 2's, then a run of 1's, then a run of 0's.
1
210, 2100, 2110, 2210, 21000, 21100, 21110, 22100, 22110, 22210, 210000, 211000, 211100, 211110, 221000, 221100, 221110, 222100, 222110, 222210, 2100000, 2110000, 2111000, 2111100, 2111110, 2210000, 2211000, 2211100, 2211110, 2221000, 2221100, 2221110
OFFSET
1,1
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, Map[#[[1]] &, Split[IntegerDigits[#, 3]]] == {2, 1, 0}} &,
Range[0, 6000, 3]], #[[2]] &]] (* A371052 *)
ToExpression[Map[IntegerString[#, 3] &, %]] (* this sequence *)
(* Peter J. C. Moses, Mar 06 2024 *)
PROG
(Python)
from itertools import count, islice
def A371053_gen(): # generator of terms
return ((10**b*(10**a-1<<1)+10**b-1)//9*10**(l-a-b) for l in count(3) for a in range(1, l-1) for b in range(1, l-a))
A371053_list = list(islice(A371053_gen(), 20)) # Chai Wah Wu, Mar 21 2024
CROSSREFS
Sequence in context: A187309 A104902 A371111 * A135201 A187663 A064260
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 17 2024
STATUS
approved