OFFSET
1,3
COMMENTS
Equivalently, list 1, where, at stage k>1, write i in list 1 and j in list 2, where i is the number of j's in list 1, for j=1,2,...,m, where m=max number in list 1 from stages 1 to k-1; stage 1 is 1 in list 1.
Differs from A030717 in that this sequence includes 0's. - Sean A. Irvine, Apr 08 2020
Nevertheless, this sequence starts each row with the count of 1's, not 0's, whose counts are not recorded in the sequence (cf. A174382, which is also initialized with a 0). - Peter Munn, Oct 11 2022
LINKS
Franklin T. Adams-Watters, First 32 rows, flattened
Michael De Vlieger, Plot a(w(j) + k - 1) at (j,k) for j = 1..60 and w the sequence of partial sums of A126027, showing a(m) = 0 in black, a(m) = 1 in red, and a(m) > 1 in light blue.
Sean A. Irvine, Java program (github)
EXAMPLE
1;
1;
2;
2, 1;
3, 2;
3, 3, 1;
4, 3, 3;
MATHEMATICA
t = {{1}}; Do[AppendTo[t, BinCounts[#, {1, Max[#] + 1}] &[Flatten[t]]], {30}];
Map[Length, t] (* A126027*)
Map[Total, t] (* A253170*)
Flatten[t] (* A333867 *) (* Peter J. C. Moses, Apr 09 2020 *)
PROG
(Haskell)
import Data.List (sort, group)
a030717 n k = a030717_tabf !! (n-1) !! (k-1)
a030717_row n = a030717_tabf !! (n-1)
a030717_tabf = [1] : f [1] where
f xs = ys : f ((filter (> 0) ys) ++ xs) where
ys = h (group $ sort xs) [1..] where
h [] _ = []
h vss'@(vs:vss) (w:ws)
| head vs == w = (length vs) : h vss ws
| otherwise = 0 : h vss' ws
-- Reinhard Zumkeller, Dec 28 2014
CROSSREFS
KEYWORD
nonn,tabf,nice
AUTHOR
EXTENSIONS
More terms from Franklin T. Adams-Watters, Dec 14 2006
STATUS
approved