A157635 Triangle read by rows: T(n,m) = 1 if n*m*(n-m) = 0, and n*m*(n-m) otherwise.
1, 1, 1, 1, 2, 1, 1, 6, 6, 1, 1, 12, 16, 12, 1, 1, 20, 30, 30, 20, 1, 1, 30, 48, 54, 48, 30, 1, 1, 42, 70, 84, 84, 70, 42, 1, 1, 56, 96, 120, 128, 120, 96, 56, 1, 1, 72, 126, 162, 180, 180, 162, 126, 72, 1, 1, 90, 160, 210, 240, 250, 240, 210, 160, 90, 1
Offset: 0
Examples
Triangle begins as: 1; 1, 1; 1, 2, 1; 1, 6, 6, 1; 1, 12, 16, 12, 1; 1, 20, 30, 30, 20, 1; 1, 30, 48, 54, 48, 30, 1;
Links
- G. C. Greubel, Rows n = 0..100 of triangle, flattened
Programs
-
Magma
[[n*k*(n-k) eq 0 select 1 else n*k*(n-k): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Apr 09 2019
-
Mathematica
Table[If[n*m*(n-m)==0, 1, n*m*(n-m)], {n, 0, 10}, {m, 0, n}]//Flatten (* modified by G. C. Greubel, Apr 09 2019 *)
-
PARI
{T(n,k) = if(n*k*(n-k)==0, 1, n*k*(n-k))}; \\ G. C. Greubel, Apr 09 2019
-
Sage
@CachedFunction def T(n, k): if (n*k*(n-k)==0): return 1 else: return n*k*(n-k) [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Apr 09 2019
Formula
T(n,m) = 1 if n*m*(n - m) = 0, and n*m*(n - m) otherwise.
Extensions
Edited by G. C. Greubel, Apr 09 2019
Comments