A033169 Erroneous version of A002464.
1, 0, 0, 2, 14, 94
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Triangle T(n,k) begins (n >= 1, k = 0..n-1): 1; 0, 2; 0, 4, 2; 2, 10, 10, 2; 14, 40, 48, 16, 2; 90, 230, 256, 120, 22, 2; 646, 1580, 1670, 888, 226, 28, 2; ...
S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2] [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2) -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4))) end: T:= (n, k)-> coeff(S(n), t, k): seq(seq(T(n, k), k=0..n-1), n=1..10); # Alois P. Heinz, Jan 11 2013
s[n_] := s[n] = If[n < 4, {1, 1, 2*t, 4*t + 2*t^2}[[n + 1]], Expand[(n + 1 - t)*s[n - 1] - (1 - t)*(n - 2 + 3*t)*s[n - 2] - (1 - t)^2*(n - 5 + t)*s[n - 3] + (1 - t)^3*(n - 3)* s[n - 4]]]; t[n_, k_] := Ceiling[Coefficient[s[n], t, k]]; Flatten[ Table[ Table[t[n, k], {k, 0, n - 1}], {n, 1, 10}]] (* Jean-François Alcover, Jan 25 2013, translated from Alois P. Heinz's Maple program *)
Triangle T(n,k) begins: 1; 0, 1; 0, 0, 2; 0, 0, 4, 6; 0, 2, 16, 20, 24; 0, 14, 44, 80, 108, 120; 0, 90, 200, 384, 544, 672, 720; 0, 646, 1288, 2240, 3264, 4128, 4800, 5040; 0, 5242, 9512, 15424, 23040, 28992, 34752, 38880, 40320; ...
S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2] [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2) -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4))) end: a:= n-> coeff(S(n), t, 1): seq(a(n), n=0..30); # Alois P. Heinz, Dec 21 2012
S[n_] := S[n] = If[n<4, {1, 1, 2*t, 4*t+2*t^2}[[n+1]], Expand[(n+1-t)*S[n-1]-(1-t)*(n-2+3*t)*S[n-2]-(1-t)^2*(n-5+t)*S[n-3]+(1-t)^3*(n-3)*S[n-4]]]; a[n_] := Coefficient[S[n], t, 1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 11 2014, after Alois P. Heinz *)
S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2] [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2) -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4))) end: a:= n-> coeff(S(n), t, 1)/2: seq(a(n), n=0..30); # Alois P. Heinz, Dec 21 2012
S[n_] := S[n] = If[n<4, {1, 1, 2*t, 4*t+2*t^2}[[n+1]], Expand[(n+1-t)*S[n-1] - (1-t)*(n-2+3*t)*S[n-2] - (1-t)^2*(n-5+t)*S[n-3] + (1-t)^3*(n-3)*S[n-4]]]; a[n_] := Coefficient[S[n], t, 1]/2; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)
seq(n)={my(m=3); Vec(sum(k=0, n, k!*((2*x^m-x^(m+1)-x)/(x^m-1) + O(x*x^n))^k))} \\ Andrew Howroyd, Aug 31 2018
The Riordan triangle T begins: n\k 0 1 2 3 4 5 6 7 8 9 10 ... ---------------------------------------------------- 0: 1 1: 2 1 2: 3 4 1 3: 4 9 6 1 4: 5 16 19 8 1 5: 6 25 44 33 10 1 6: 7 36 85 96 51 12 1 7: 8 49 146 225 180 73 14 1 8: 9 64 231 456 501 304 99 16 1 9: 10 81 344 833 1182 985 476 129 18 1 10: 11 100 489 1408 2471 2668 1765 704 163 20 1 ... reformatted and extended by _Wolfdieter Lang_, May 13 2025 From _Wolfdieter Lang_, May 13 2025: (Start) Zumkeller recurrence (adapted for offset [0,0]): 19 = T(4, 2) = T(2, 1) + T(3, 1) + T(3,3) = 4 + 9 + 6 = 19. A-sequence recurrence: 19 = T(4, 2) = 1*T(3. 1) + 2*T(3. 2) - 2*T(3, 3) = 9 + 12 - 2 = 19. Z-sequence recurrence: 5 = T(4, 0) = 2*T(3, 0) - 1*T(3, 1) + 2*T(3, 2) - 6*T(3, 3) = 8 - 9 + 12 + 6 = 5. Boas-Buck recurrence: 19 = T(4, 2) = (1/2)*((2 + 0)*T(2, 2) + (2 + 2*2)*T(3, 2)) = (1/2)*(2 + 36) = 19. (End)
a104698 n k = a104698_tabl !! (n-1) !! (k-1) a104698_row n = a104698_tabl !! (n-1) a104698_tabl = [1] : [2,1] : f [1] [2,1] where f us vs = ws : f vs ws where ws = zipWith (+) ([0] ++ us ++ [0]) $ zipWith (+) ([1] ++ vs) (vs ++ [0]) -- Reinhard Zumkeller, Jul 17 2015
A104698 := proc(n, k) add(binomial(k, j)*binomial(n-j+1, n-k-j), j=0..n-k) ; end proc: seq(seq(A104698(n, k), k=0..n), n=0..15); # R. J. Mathar, Sep 04 2011 T := (n, k) -> binomial(n + 1, k + 1)*hypergeom([-k, k - n], [-n - 1], -1): for n from 0 to 9 do seq(simplify(T(n, k)), k = 0..n) od; T := proc(n, k) option remember; if k = 0 then n + 1 elif k = n then 1 else T(n-2, k-1) + T(n-1, k-1) + T(n-1, k) fi end: # Peter Luschny, May 13 2025
u[1, ] = 1; v[1, ] = 1; u[n_, x_] := u[n, x] = x u[n-1, x] + v[n-1, x] + 1; v[n_, x_] := v[n, x] = 2 x u[n-1, x] + v[n-1, x] + 1; Table[CoefficientList[u[n, x], x], {n, 1, 11}] // Flatten (* Jean-François Alcover, Mar 10 2019, after Clark Kimberling *)
T(n,k)=sum(j=0,n-k,binomial(k,j)*binomial(n-j+1,k+1)) \\ Charles R Greathouse IV, Jan 16 2012
For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142. For n = 5 the a(5) = 12 solutions are these 12 permutations: 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, and 53142.
a:= proc(n) option remember; `if`(n<4, [1,0$3][n+1], (n+1)*a(n-1)-(n-3)*(a(n-2)+a(n-3))+(n-2)*a(n-4)) end: seq(a(n), n=0..24); # Alois P. Heinz, Apr 04 2025
nmax = 20; CoefficientList[Series[Sum[k!*x^k*(1-x)^k/(1+x)^(k+1), {k, 0, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Apr 04 2025 *)
my(N=30, t='t+O('t^N)); Vec(sum(n=0,N,n!*t^n*(1-t)^n/(1+t)^(n+1))) \\ Joerg Arndt, Apr 03 2025
Comments