login
Triangle read by rows in which row n >= 1 lists the count of 0's, ..., k's in all previous terms in the triangle. T(0,0) = 0, k is from [0..A049820(n)].
1

%I #38 Nov 12 2021 12:25:55

%S 0,1,1,1,3,1,4,1,5,0,1,2,6,1,2,7,2,1,1,1,2,10,4,1,2,2,11,6,1,2,1,2,2,

%T 13,9,1,2,1,2,2,15,12,1,2,1,2,1,0,1,3,19,14,2,2,1,2,3,20,17,3,2,1,2,1,

%U 0,1,1,1,4,25,19,4,4,1,2,1,0,1,1,5,29,20,4,6,2,3,1,0,1,1,1

%N Triangle read by rows in which row n >= 1 lists the count of 0's, ..., k's in all previous terms in the triangle. T(0,0) = 0, k is from [0..A049820(n)].

%C For n >= 1 the n-th row length equals A049820(n) + 1. The same definition, but for k from [0..n] gives A032531.

%H Michael De Vlieger, <a href="/A349042/a349042.png">Scatterplot of a(n)</a> for n=0..31686, i.e., rows 0..256.

%H Michael De Vlieger, <a href="/A349042/a349042_1.png">Scatterplot of a(n)</a>for n=0..518562, i.e., rows 0..1024

%H <a href="/index/In#inventory">Index entries for sequences related to the inventory sequence</a>

%e Triangle begins:

%e k=0 1 2 3 4 5

%e n=0: 0;

%e n=1: 1;

%e n=2: 1;

%e n=3: 1, 3;

%e n=4: 1, 4;

%e n=5: 1, 5, 0, 1;

%e n=6: 2, 6, 1;

%e n=7: 2, 7, 2, 1, 1, 1;

%t c[_] = 0; Reap[Do[w = {}; Array[(Set[m, c[#]]; c[m]++; AppendTo[w, m]) &, If[n == 0, 1, n - DivisorSigma[0, n] + 1], 0]; Sow[w], {n, 0, 15}]][[-1, -1]] // Flatten (* _Michael De Vlieger_, Nov 09 2021 *)

%o (Python)

%o from collections import Counter

%o from sympy import divisor_count

%o def auptor(rows):

%o alst, inventory = [0], Counter([0])

%o for m in range(1, rows):

%o for k in range(m-divisor_count(m)+1):

%o c = inventory[k]; alst.append(c); inventory.update([c])

%o return alst

%o print(auptor(16)) # _Michael S. Branicky_, Nov 07 2021

%Y Cf. A032531, A049820.

%K nonn,tabf

%O 0,5

%A _Ctibor O. Zizka_, Nov 06 2021