OFFSET
0,5
COMMENTS
LINKS
Reinhard Zumkeller, Rows n = 0..120 of triangle, flattened
Bela Bajnok, Additive Combinatorics: A Menu of Research Problems, arXiv:1705.07444 [math.NT], May 2017. See Sect. 2.3.
Huyile Liang, Yanni Pei, and Yi Wang, Analytic combinatorics of coordination numbers of cubic lattices, arXiv:2302.11856 [math.CO], 2023. See p. 1.
FORMULA
Sum_{k=0..n} x^k*T(n,k) = A000007(n), A001333(n), A104934(n), A122558(n), A122690(n), A091928(n) for x = 0, 1, 2, 3, 4, 5. - Philippe Deléham, Jan 25 2012
Sum_{k=0..n} 3^(n-k)*T(n,k) = A086901(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A007483(n-1), n >= 1. - Philippe Deléham, Oct 08 2006
T(2*n, n) = A123164(n).
T(n, k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-1), n > 1. - Philippe Deléham, Jan 25 2012
G.f.: (1-x)/(1-(1+y)*x-y*x^2). - Philippe Deléham, Mar 02 2012
From G. C. Greubel, Oct 27 2024: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A057077(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A001590(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A078016(n). (End)
EXAMPLE
Triangle begins:
1;
0, 1;
0, 2, 1;
0, 2, 4, 1;
0, 2, 8, 6, 1;
0, 2, 12, 18, 8, 1;
0, 2, 16, 38, 32, 10, 1;
0, 2, 20, 66, 88, 50, 12, 1;
0, 2, 24, 102, 192, 170, 72, 14, 1;
0, 2, 28, 146, 360, 450, 292, 98, 16, 1;
0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1;
MATHEMATICA
CoefficientList[#, y]& /@ CoefficientList[(1-x)/(1 - (1+y)x - y x^2) + O[x]^11, x] // Flatten (* Jean-François Alcover, Sep 09 2018 *)
(* Second program *)
T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, 0, T[n-1, k-1] +T[n-1, k] +T[n-2, k- 1] ]]; (* T = A122542 *)
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Oct 27 2024 *)
PROG
(Haskell)
a122542 n k = a122542_tabl !! n !! k
a122542_row n = a122542_tabl !! n
a122542_tabl = map fst $ iterate
(\(us, vs) -> (vs, zipWith (+) ([0] ++ us ++ [0]) $
zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [0, 1])
-- Reinhard Zumkeller, Jul 20 2013, Apr 17 2013
(Sage)
def A122542_row(n):
@cached_function
def prec(n, k):
if k==n: return 1
if k==0: return 0
return prec(n-1, k-1)+2*sum(prec(n-i, k-1) for i in (2..n-k+1))
return [prec(n, k) for k in (0..n)]
for n in (0..10): print(A122542_row(n)) # Peter Luschny, Mar 16 2016
(Magma)
function T(n, k) // T = A122542
if k eq 0 then return 0^n;
elif k eq n then return 1;
else return T(n-1, k) + T(n-1, k-1) + T(n-2, k-1);
end if;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 27 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, Sep 19 2006, May 28 2007
STATUS
approved