OFFSET
1,6
COMMENTS
Construction as in A333867 but starting with a 0 and including a count of 0s at the start of each row. [Edited by Peter Munn, Oct 11 2022]
See A342585 for a similarly defined sequence that has been analyzed more and has lists of other related sequences. - Peter Munn, Oct 08 2022
LINKS
Reinhard Zumkeller, Rows n = 1..25 of table, flattened
EXAMPLE
0;
1; # one zero
1,1; # one zero, one one
1,3; # one zero, three ones
1,4,0,1; # one zero, four ones, zero twos, one three
PROG
(Haskell)
import Data.List (sort, group)
a174382 n k = a174382_tabf !! (n-1) !! k
a174382_row n = a174382_tabf !! (n-1)
a174382_tabf = iterate f [0] where
f xs = g (xs ++ [0, 0 ..]) [0..] (map head zs) (map length zs)
where g _ _ _ [] = []
g (u:us) (k:ks) hs'@(h:hs) vs'@(v:vs)
| k == h = u + v : g us ks hs vs
| k /= h = u : g us ks hs' vs'
zs = group $ sort xs
-- Reinhard Zumkeller, Apr 06 2014
CROSSREFS
KEYWORD
AUTHOR
Paolo P. Lava & Giorgio Balzarotti, Mar 17 2010
STATUS
approved