|
|
A371051
|
|
Ternary numbers consisting of a run of 1's, then a run of 2's, then a run of 0's.
|
|
1
|
|
|
120, 1120, 1200, 1220, 11120, 11200, 11220, 12000, 12200, 12220, 111120, 111200, 111220, 112000, 112200, 112220, 120000, 122000, 122200, 122220, 1111120, 1111200, 1111220, 1112000, 1112200, 1112220, 1120000, 1122000, 1122200, 1122220, 1200000, 1220000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
Map[#[[1]] &, Select[Map[{#, Map[#[[1]] &, Split[IntegerDigits[#, 3]]] == {1, 2, 0}} &,
Range[0, 4000, 3]], #[[2]] &]] (* A371050 *)
ToExpression[Map[IntegerString[#, 3] &, %]] (* this sequence *)
|
|
PROG
|
(Python)
from itertools import count, islice
def A371051_gen(): # generator of terms
return ((10**b*(10**(l-a)-1)+(10**b-1<<1))//9*10**(a-b) for l in count(3) for a in range(2, l) for b in range(1, a))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|