login
A283321
Triangle read by rows: T(n,k) (0 <= k <= n) = number of elements of alternating semigroup A_n of height k.
2
1, 1, 1, 1, 2, 1, 1, 9, 9, 3, 1, 16, 72, 48, 12, 1, 25, 200, 600, 300, 60, 1, 36, 450, 2400, 5400, 2160, 360, 1, 49, 882, 7350, 29400, 52920, 17640, 2520, 1, 64, 1568, 18816, 117600, 376320, 564480, 161280, 20160, 1, 81, 2592, 42336, 381024, 1905120, 5080320, 6531840, 1632960, 181440
OFFSET
0,5
COMMENTS
T(n,1) = A000290(n) for n>0, except T(2,1) which equals 2. - Indranil Ghosh, Mar 16 2017
LINKS
Indranil Ghosh, Rows 0..100, flattened
G. N. Bakare, S. O. Makanjuola, Some Results on Properties of Alternating Semigroups, Nigerian Journal of Mathematics and Applications Volume 24,(2015), 184-192.
FORMULA
Bakare et al. give a formula, see Theorem 3.2.
EXAMPLE
Triangle begins:
1,
1,1,
1,2,1,
1,9,9,3,
1,16,72,48,12,
1,25,200,600,300,60,
1,36,450,2400,5400,2160,360,
...
MATHEMATICA
T[n_, k_]:=If[k==n, (n!/2), If[k==n - 1, n^2*(n - 1)!/2, Binomial[n, k]^2 * k!]]; Column[Table[If[n<2, 1, T[n, k]], {n, 0, 10}, {k, 0, n}]] (* Indranil Ghosh, Mar 16 2017 *)
PROG
(PARI) T(n, k) = if(k==n, (n!/2), if(k==n - 1, n^2*(n - 1)!/2, binomial(n, k)^2 * k!));
tabl(nn) = {for(n=0, nn, for(k=0, n, print1(if(n<2, 1, T(n, k)), ", "); ); print(); ); };
tabl(10); \\ Indranil Ghosh, Mar 16 2017
(Python)
from sympy import binomial, factorial
def T(n, k):
if k==n: return factorial(n)//2
elif k==n-1: return n**2 * factorial(n - 1) // 2
else: return binomial(n, k)**2 * factorial(k)
i = 0
for n in range(10):
for k in range(n + 1):
if n < 2: print("1")
else: print(T(n, k))
i += 1 # Indranil Ghosh, Mar 16 2017
CROSSREFS
Cf. A000290, For row sums see A283322.
Sequence in context: A176417 A119731 A368928 * A155718 A327088 A376860
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Mar 15 2017
STATUS
approved