OFFSET
0,3
LINKS
Reinhard Zumkeller, Rows n=0..1000 of triangle, flattened
EXAMPLE
Rows 100 .. 112:
. 100: {0, 1, 10, 100},
. 101: {0, 1, 10, 101},
. 102: {0, 1, 2, 10, 102},
. 103: {0, 1, 3, 10, 103},
. 104: {0, 1, 4, 10, 104},
. 105: {0, 1, 5, 10, 105},
. 106: {0, 1, 6, 10, 106},
. 107: {0, 1, 7, 10, 107},
. 108: {0, 1, 8, 10, 108},
. 109: {0, 1, 9, 10, 109},
. 110: {0, 1, 10 ,11, 110},
. 111: {1, 11, 111},
. 112: {1, 2, 11, 12, 112}.
PROG
(Haskell)
import Data.List (inits, tails, sort, nub, genericIndex)
a218978 n k = a218978_row n !! k
a218978_row n = genericIndex a218978_tabf n
a218978_tabf = map (sort . nub . map (foldr (\d v -> 10 * v + d) 0) .
concatMap (tail . inits) . tails) a031298_tabf
-- Reinhard Zumkeller, corrected: Sep 15 2015, May 02 2015, Nov 10 2012
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, May 02 2015, Nov 10 2012
STATUS
approved