%I #25 Oct 27 2023 22:00:44
%S 0,1,1,4,2,4,9,6,6,9,16,15,12,15,16,25,31,27,27,31,25,36,56,58,54,58,
%T 56,36,49,92,114,112,112,114,92,49,64,141,206,226,224,226,206,141,64,
%U 81,205,347,432,450,450,432,347,205,81,100,286,552,779,882,900,882,779
%N Rows of triangle formed using Pascal's rule except begin and end n-th row with n^2.
%C Row sums give 6*2^n - 4*n - 6 (A051667).
%C Central terms: T(2*n,n) = 2 * A220101(n). - _Reinhard Zumkeller_, Aug 05 2013
%C For a closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - _Boris Putievskiy_, Aug 19 2013
%C For a closed-form formula for generalized Pascal's triangle see A228576. - _Boris Putievskiy_, Sep 09 2013
%H Reinhard Zumkeller, <a href="/A051666/b051666.txt">Rows n = 0..100 of table, flattened</a>
%e Triangle begins:
%e 0;
%e 1, 1;
%e 4, 2, 4;
%e 9, 6, 6, 9;
%e 16, 15, 12, 15, 16;
%e ...
%t T[n_, 0] := n^2; T[n_, n_] := n^2;
%t T[n_, k_] := T[n, k] = T[n-1, k-1] + T[n-1, k];
%t Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jul 13 2018 *)
%o (Haskell)
%o a051666 n k = a051666_tabl !! n !! k
%o a051666_row n = a051666_tabl !! n
%o a051666_tabl = map fst $ iterate
%o (\(vs, w:ws) -> (zipWith (+) ([w] ++ vs) (vs ++ [w]), ws))
%o ([0], [1, 3 ..])
%o -- _Reinhard Zumkeller_, Aug 05 2013
%Y Cf. A007318, A000290, A005408, A228196, A228576.
%K easy,nonn,tabl
%O 0,4
%A _Asher Auel_
%E More terms from _James A. Sellers_