OFFSET
1,2
COMMENTS
LINKS
EXAMPLE
. ----+------+----------- ----+------+-------------
. (25 | 26 | 222 )
. 1 | 1 | 1 26 | 24 | 220
. 2 | 3 | 10 27 | 29 | 1002
. 3 | 4 | 11 28 | 28 | 1001
. 4 | 5 | 12 29 | 27 | 1000
. 5 | 2 | 2 30 | 30 | 1010
. 6 | 6 | 20 31 | 31 | 1011
. 7 | 8 | 22 32 | 32 | 1012
. 8 | 7 | 21 33 | 34 | 1021
. 9 | 9 | 100 34 | 33 | 1020
. 10 | 10 | 101 35 | 37 | 1101
. 11 | 11 | 102 36 | 35 | 1022
. 12 | 12 | 110 37 | 38 | 1102
. 13 | 13 | 111 38 | 39 | 1110
. 14 | 14 | 112 39 | 36 | 1100
. 15 | 15 | 120 40 | 40 | 1111
. 16 | 16 | 121 41 | 41 | 1112
. 17 | 17 | 122 42 | 42 | 1120
. 18 | 18 | 200 43 | 43 | 1121
. 19 | 20 | 202 44 | 44 | 1122
. 20 | 19 | 201 45 | 46 | 1201
. 21 | 23 | 212 46 | 45 | 1200
. 22 | 21 | 210 47 | 49 | 1211
. 23 | 25 | 221 48 | 47 | 1202
. 24 | 22 | 211 49 | 50 | 1212
. 25 | 26 | 222 50 | 48 | 1210 .
. (26 | 24 | 220 )
PROG
(Haskell)
import Data.List (inits, tails, intersect, delete, genericIndex)
a262411 n = genericIndex a262411_list (n - 1)
a262411_list = 1 : f [1] (drop 2 a030341_tabf) where
f xs tss = g tss where
g (ys:yss) | null (intersect its $ tail $ inits ys) &&
null (intersect tis $ init $ tails ys) = g yss
| otherwise = (foldr (\t v -> 3 * v + t) 0 ys) :
f ys (delete ys tss)
its = init $ tails xs; tis = tail $ inits xs
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Sep 22 2015
STATUS
approved