cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.)

This page as a plain text file.
%I A247976 #19 Feb 27 2025 03:27:33
%S A247976 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 A247976 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 A247976 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 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.)
%C A247976 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 A247976 G. C. Greubel, <a href="/A247976/b247976.txt">Rows n = 1..50 of the triangle, flattened</a>
%H A247976 Kival Ngaokrajang, <a href="/A247976/a247976.pdf">Illustration of initial terms</a>
%F A247976 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 A247976 Triangle begins:
%e A247976   1;
%e A247976   1,  1;
%e A247976   1,  1,  2;
%e A247976   1,  2,  1,  2;
%e A247976   1,  2,  1,  3,  3;
%e A247976   1,  3,  3,  1,  3,  3;
%e A247976   1,  3,  3,  1,  4,  6,  4;
%e A247976   1,  4,  6,  4,  1,  4,  6,  4;
%e A247976   1,  4,  6,  4,  1,  5, 10, 10,  5;
%e A247976   1,  5, 10, 10,  5,  1,  5, 10, 10, 5;
%e A247976   ...
%t A247976 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 A247976 Table[T[n, k], {n,15}, {k,n}]//Flatten (* _G. C. Greubel_, Feb 18 2022 *)
%o A247976 (Small Basic)
%o A247976 a[1][1]=1
%o A247976 a[2][1]=1
%o A247976 a[2][2]=1
%o A247976 TextWindow.Write(1+", "+1+", "+1+", ")
%o A247976 for n=3 To 30
%o A247976   If Math.Remainder(n,2)=1 then
%o A247976     '===========odd n=================
%o A247976     j=1
%o A247976     for k=1 To n
%o A247976       If k <= (n/2+1/2) then
%o A247976          a[n][k]=a[n-1][k]
%o A247976        Else
%o A247976          a[n][k]=a[n][j]+a[n][j+1]
%o A247976          j=j+1
%o A247976        EndIf
%o A247976        TextWindow.Write(a[n][k]+", ")
%o A247976      EndFor
%o A247976   else
%o A247976     '==============even n===============
%o A247976     For k=1 To n
%o A247976       If k <=1 Then
%o A247976         a[n][k]=1
%o A247976       Else
%o A247976         If k < n/2+1 then
%o A247976           a[n][k]=a[n-1][k-1]+a[n-1][k]
%o A247976         Else
%o A247976           a[n][k]=a[n][k-n/2]
%o A247976         EndIf
%o A247976       EndIf
%o A247976       TextWindow.Write(a[n][k]+", ")
%o A247976     EndFor
%o A247976   EndIf
%o A247976 EndFor
%o A247976 (Sage)
%o A247976 @CachedFunction
%o A247976 def T(n,k): # A247976
%o A247976     if (k==1): return 1
%o A247976     elif (k==n): return (n+1)//2
%o A247976     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 A247976     else: return T(n-1,k-1)+T(n-1,k) if (k < (n+2)/2) else T(n,k-n/2)
%o A247976 flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # _G. C. Greubel_, Feb 18 2022
%Y A247976 Rows sum: A027383.
%Y A247976 Column (start from 1s): c3=A008805, c4=A058187, c5=A000332 repeated, c6=A000389 repeated, c7=A000579 repeated.
%Y A247976 Vertex to vertex: A061777, A247618, A247619, A247620.
%Y A247976 Vertex to side: A101946, A247903, A247904, A247905.
%Y A247976 Cf. A074909.
%K A247976 tabl,nonn
%O A247976 1,6
%A A247976 _Kival Ngaokrajang_, Sep 28 2014