%I #16 Feb 18 2022 02:44:18
%S 1,1,1,1,1,2,1,2,1,2,1,2,1,3,3,1,3,3,1,3,3,1,3,3,1,4,6,4,1,4,6,4,1,4,
%T 6,4,1,4,6,4,1,5,10,10,5,1,5,10,10,5,1,5,10,10,5,1,5,10,10,5,1,6,15,
%U 20,15,6,1,6,15,20,15,6,1,6,15,20,15,6,1,6,15,20,15,6,1,7,21,35,35,21,7
%N Triangle read by rows: T(n,k) generated by m-gon expansions in the case of odd m with "vertex to vertex" version or even m with "vertex to side" version. (See comment for details.)
%C Refer to triangle expansions in A061777 and A101946 (and their companions for m-gons) which are "vertex to vertex" and "vertex to side" versions respectively. The label values at each iteration can be arranged as triangle. Any m-gon can also be arranged as the same triangle with conditions: (i) m is odd and expansion is "vertex to vertex" version or (ii) m is even and expansion is "vertex to side" version. m*Sum_{i=1..k}T(n,k) gives the total label value in n-th iteration. See illustration.
%H G. C. Greubel, <a href="/A247976/b247976.txt">Rows n = 1..50 of the triangle, flattened</a>
%H Kival Ngaokrajang, <a href="/A247976/a247976.pdf">Illustration of initial terms</a>
%F T(n, k) = ( T(n-1, k) if k <= (n+1)/2) otherwise T(n-1, k-1) + T(n-1, k) ) for odd n rows, ( T(n-1, k-1) + T(n-1, k) if k < (n+2)/2 otherwise T(n, k - n/2) ) for even n rows, with T(n, 1) = 1 and T(n, n) = floor((n+1)/2). - _G. C. Greubel_, Feb 18 2022
%e Triangle begins:
%e 1;
%e 1, 1;
%e 1, 1, 2;
%e 1, 2, 1, 2;
%e 1, 2, 1, 3, 3;
%e 1, 3, 3, 1, 3, 3;
%e 1, 3, 3, 1, 4, 6, 4;
%e 1, 4, 6, 4, 1, 4, 6, 4;
%e 1, 4, 6, 4, 1, 5, 10, 10, 5;
%e 1, 5, 10, 10, 5, 1, 5, 10, 10, 5;
%e ...
%t T[n_, k_]:= T[n, k]= If[k==1, 1, If[k==n, Floor[(n+1)/2], If[OddQ[n], If[k<=(n+ 1)/2, T[n-1, k], T[n-1, k-1] + T[n-1, k]], If[k<n/2 +1, T[n-1, k-1] + T[n-1, k], T[n, k-n/2] ]]]];
%t Table[T[n, k], {n,15}, {k,n}]//Flatten (* _G. C. Greubel_, Feb 18 2022 *)
%o (Small Basic)
%o a[1][1]=1
%o a[2][1]=1
%o a[2][2]=1
%o TextWindow.Write(1+", "+1+", "+1+", ")
%o for n=3 To 30
%o If Math.Remainder(n,2)=1 then
%o '===========odd n=================
%o j=1
%o for k=1 To n
%o If k <= (n/2+1/2) then
%o a[n][k]=a[n-1][k]
%o Else
%o a[n][k]=a[n][j]+a[n][j+1]
%o j=j+1
%o EndIf
%o TextWindow.Write(a[n][k]+", ")
%o EndFor
%o else
%o '==============even n===============
%o For k=1 To n
%o If k <=1 Then
%o a[n][k]=1
%o Else
%o If k < n/2+1 then
%o a[n][k]=a[n-1][k-1]+a[n-1][k]
%o Else
%o a[n][k]=a[n][k-n/2]
%o EndIf
%o EndIf
%o TextWindow.Write(a[n][k]+", ")
%o EndFor
%o EndIf
%o EndFor
%o (Sage)
%o @CachedFunction
%o def T(n,k): # A247976
%o if (k==1): return 1
%o elif (k==n): return (n+1)//2
%o elif (n%2==1): return T(n-1,k) if (k <= (n+1)/2) else T(n-1,k-1) + T(n-1,k)
%o else: return T(n-1,k-1)+T(n-1,k) if (k < (n+2)/2) else T(n,k-n/2)
%o flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # _G. C. Greubel_, Feb 18 2022
%Y Rows sum: A027383.
%Y Column (start from 1s): c3=A008805, c4=A058187, c5=A000332 repeated, c6=A000389 repeated, c7=A000579 repeated.
%Y Vertex to vertex: A061777, A247618, A247619, A247620.
%Y Vertex to side: A101946, A247903, A247904, A247905.
%Y Cf. A074909.
%K tabl,nonn
%O 1,6
%A _Kival Ngaokrajang_, Sep 28 2014