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
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Mar 15 2017
STATUS
approved