login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A247976
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.)
3
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, 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, 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
OFFSET
1,6
COMMENTS
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.
FORMULA
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
EXAMPLE
Triangle begins:
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, 6, 4;
1, 4, 6, 4, 1, 5, 10, 10, 5;
1, 5, 10, 10, 5, 1, 5, 10, 10, 5;
...
MATHEMATICA
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] ]]]];
Table[T[n, k], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Feb 18 2022 *)
PROG
(Small Basic)
a[1][1]=1
a[2][1]=1
a[2][2]=1
TextWindow.Write(1+", "+1+", "+1+", ")
for n=3 To 30
If Math.Remainder(n, 2)=1 then
'===========odd n=================
j=1
for k=1 To n
If k <= (n/2+1/2) then
a[n][k]=a[n-1][k]
Else
a[n][k]=a[n][j]+a[n][j+1]
j=j+1
EndIf
TextWindow.Write(a[n][k]+", ")
EndFor
else
'==============even n===============
For k=1 To n
If k <=1 Then
a[n][k]=1
Else
If k < n/2+1 then
a[n][k]=a[n-1][k-1]+a[n-1][k]
Else
a[n][k]=a[n][k-n/2]
EndIf
EndIf
TextWindow.Write(a[n][k]+", ")
EndFor
EndIf
EndFor
(Sage)
@CachedFunction
def T(n, k): # A247976
if (k==1): return 1
elif (k==n): return (n+1)//2
elif (n%2==1): return T(n-1, k) if (k <= (n+1)/2) else T(n-1, k-1) + T(n-1, k)
else: return T(n-1, k-1)+T(n-1, k) if (k < (n+2)/2) else T(n, k-n/2)
flatten([[T(n, k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Feb 18 2022
CROSSREFS
Rows sum: A027383.
Column (start from 1s): c3=A008805, c4=A058187, c5=A000332 repeated, c6=A000389 repeated, c7=A000579 repeated.
Vertex to vertex: A061777, A247618, A247619, A247620.
Vertex to side: A101946, A247903, A247904, A247905.
Cf. A074909.
Sequence in context: A161261 A161286 A185216 * A280986 A344773 A103689
KEYWORD
tabl,nonn
AUTHOR
Kival Ngaokrajang, Sep 28 2014
STATUS
approved