A084327 Duplicate of A057085.
0, 1, 9, 72, 567, 4455, 34992, 274833, 2158569, 16953624, 133155495, 1045816839
Offset: 0
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\k 0 1 2 3 4 5 6 7 8 9 10 11 ... 0 1 1 1 1 2 1 2 1 3 1 3 3 1 4 1 4 6 4 1 5 1 5 10 10 5 1 6 1 6 15 20 15 6 1 7 1 7 21 35 35 21 7 1 8 1 8 28 56 70 56 28 8 1 9 1 9 36 84 126 126 84 36 9 1 10 1 10 45 120 210 252 210 120 45 10 1 11 1 11 55 165 330 462 462 330 165 55 11 1 ... There are C(4,2)=6 ways to distribute 5 balls BBBBB, among 3 different urns, < > ( ) [ ], so that each urn gets at least one ball, namely, <BBB>(B)[B], <B>(BBB)[B], <B>(B)[BBB], <BB>(BB)[B], <BB>(B)[BB], and <B>(BB)[BB]. There are C(4,2)=6 increasing functions from {1,2} to {1,2,3,4}, namely, {(1,1),(2,2)},{(1,1),(2,3)}, {(1,1),(2,4)}, {(1,2),(2,3)}, {(1,2),(2,4)}, and {(1,3),(2,4)}. - _Dennis P. Walsh_, Apr 07 2011 There are C(4,2)=6 subsets of {1,2,3,4,5} with median element 3, namely, {3}, {1,3,4}, {1,3,5}, {2,3,4}, {2,3,5}, and {1,2,3,4,5}. - _Dennis P. Walsh_, Dec 15 2011 The successive k-iterations of {A(0)} = E are E;E;E;...; the corresponding number of elements are 1,1,1,... The successive k-iterations of {A(1)} = {a} are (omitting brackets) a;a,E; a,E,E;...; the corresponding number of elements are 1,2,3,... The successive k-iterations of {A(2)} = {a,a} are aa; aa,a,E; aa, a, E and a,E and E;...; the corresponding number of elements are 1,3,6,... - _Gregory L. Simay_, Aug 06 2018 Boas-Buck type recurrence for column k = 4: T(8, 4) = (5/4)*(1 + 5 + 15 + 35) = 70. See the Boas-Buck comment above. - _Wolfdieter Lang_, Nov 12 2018
-- (start) )set expose add constructor OutputForm pascal(0,n) == 1 pascal(n,n) == 1 pascal(i,j | 0 < i and i < j) == pascal(i-1,j-1) + pascal(i,j-1) pascalRow(n) == [pascal(i,n) for i in 0..n] displayRow(n) == output center blankSeparate pascalRow(n) for i in 0..20 repeat displayRow i -- (end)
Flat(List([0..12],n->List([0..n],k->Binomial(n,k)))); # Stefano Spezia, Dec 22 2018
a007318 n k = a007318_tabl !! n !! k a007318_row n = a007318_tabl !! n a007318_list = concat a007318_tabl a007318_tabl = iterate (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [1] -- Cf. http://www.haskell.org/haskellwiki/Blow_your_mind#Mathematical_sequences -- Reinhard Zumkeller, Nov 09 2011, Oct 22 2010
/* As triangle: */ [[Binomial(n, k): k in [0..n]]: n in [0.. 10]]; // Vincenzo Librandi, Jul 29 2015
A007318 := (n,k)->binomial(n,k);
Flatten[Table[Binomial[n, k], {n, 0, 11}, {k, 0, n}]] (* Robert G. Wilson v, Jan 19 2004 *) Flatten[CoefficientList[CoefficientList[Series[1/(1 - x - x*y), {x, 0, 12}], x], y]] (* Mats Granvik, Jul 08 2014 *)
create_list(binomial(n,k),n,0,12,k,0,n); /* Emanuele Munarini, Mar 11 2011 */
C(n,k)=binomial(n,k) \\ Charles R Greathouse IV, Jun 08 2011
# See Hobson link. Further programs: from math import prod,factorial def C(n,k): return prod(range(n,n-k,-1))//factorial(k) # M. F. Hasler, Dec 13 2019, updated Apr 29 2022, Feb 17 2023
from math import comb, isqrt def A007318(n): return comb(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # Chai Wah Wu, Nov 11 2024
def C(n,k): return Subsets(range(n), k).cardinality() # Ralf Stephan, Jan 21 2014
Rows begin: 1; 0, 1; 0, -1, 1; 0, 0, -2, 1; 0, 0, 1, -3, 1; 0, 0, 0, 3, -4, 1; 0, 0, 0, -1, 6, -5, 1; 0, 0, 0, 0, -4, 10, -6, 1; 0, 0, 0, 0, 1, -10, 15, -7, 1; 0, 0, 0, 0, 0, 5, -20, 21, -8, 1; 0, 0, 0, 0, 0, -1, 15, -35, 28, -9, 1; From _Paul Barry_, Sep 28 2009: (Start) Production array is 0, 1, 0, -1, 1, 0, -1, -1, 1, 0, -2, -1, -1, 1, 0, -5, -2, -1, -1, 1, 0, -14, -5, -2, -1, -1, 1, 0, -42, -14, -5, -2, -1, -1, 1, 0, -132, -42, -14, -5, -2, -1, -1, 1, 0, -429, -132, -42, -14, -5, -2, -1, -1, 1 (End)
/* As triangle */ [[(-1)^(n-k)*Binomial(k, n-k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jan 14 2016
(* The function RiordanArray is defined in A256893. *) RiordanArray[1&, #(1-#)&, 13] // Flatten (* Jean-François Alcover, Jul 16 2019 *)
I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1)-10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 17 2011
LinearRecurrence[{2,-10}, {0,1}, 50]
a(n)=([0,1; -10,2]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
[lucas_number1(n,2,10) for n in (0..50)] # G. C. Greubel, Jun 10 2022
T(3,1) = T(2,1) + T(1,1) + T(2,0) + T(1,0) = 3 + 1 + 2 + 1 = 7. Triangle begins: 1, 1, 1, 2, 3, 1, 3, 7, 5, 1, 5, 15, 16, 7, 1, 8, 30, 43, 29, 9, 1, 13, 58, 104, 95, 46, 11, 1, 21, 109, 235, 271, 179, 67, 13, 1, 34, 201, 506, 705, 591, 303, 92, 15, 1
a063967_tabl = [1] : [1,1] : f [1] [1,1] where f us vs = ws : f vs ws where ws = zipWith (+) ([0] ++ us ++ [0]) $ zipWith (+) (us ++ [0,0]) $ zipWith (+) ([0] ++ vs) (vs ++ [0]) -- Reinhard Zumkeller, Apr 17 2013
T[n_, k_] := Sum[Binomial[j, n - j]*Binomial[j, k], {j, 0, n}]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 11 2017, after Paul Barry *) (* Function RiordanSquare defined in A321620. *) RiordanSquare[1/(1 - x - x^2), 11] // Flatten (* Peter Luschny, Nov 27 2018 *)
[(10)^n*Evaluate(DicksonSecond(n, 1/10), 1): n in [0..30]]; // G. C. Greubel, May 02 2022
Join[{a=1,b=10},Table[c=10*b-10*a;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 20 2011 *)
Vec(1/(1-10*x+10*x^2) + O(x^30)) \\ Colin Barker, Jun 14 2015
[lucas_number1(n,10,10) for n in range(1, 20)] # Zerinvary Lajos, Apr 26 2009
Triangle begins: 1; 1, 1; 0, 1, 1; -1, -1, 1, 1; -1, -3, -2, 1, 1; 0, -2, -5, -3, 1, 1; 1, 2, -2, -7, -4, 1, 1; 1, 5, 7, -1, -9, -5, 1, 1; 0, 3, 12, 15, 1, -11, -6, 1, 1; -1, -3, 3, 21, 26, 4, -13, -7, 1, 1; -1, -7, -15, -3, 31, 40, 8, -15, -8, 1, 1;
T:= proc(n, k) option remember; if k<0 or k>n then 0 elif n=0 and k=0 then 1 else T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k) fi; end: seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Mar 14 2020
m = {{a, 1}, {-1, 1}}; v[0]:= {0, 1}; v[n_]:= v[n] = m.v[n-1]; Table[CoefficientList[v[n][[1]], a], {n, 0, 10}]//Flatten (* Roger L. Bagula, Nov 15 2009 *) T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n==0 && k==0, 1, T[n-1, k-1] + T[n-1, k] - T[n-2, k-1] - T[n-2, k] ]]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 14 2020 *)
@CachedFunction def T(n, k): if (k<0 or k>n): return 0 elif (n==0 and k==0): return 1 else: return T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k) [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Mar 14 2020
Square array begins: 1, 1, 1, 1, 1, 1, ... 0, 1, 2, 3, 4, 5, ... 0, 0, 2, 6, 12, 20, ... 0, -1, 0, 9, 32, 75, ... 0, -1, -4, 9, 80, 275, ... 0, 0, -8, 0, 192, 1000, ...
T:= (n, k)-> (<<0|1>, <-k|k>>^(n+1))[1, 2]: seq(seq(T(n, d-n), n=0..d), d=0..12); # Alois P. Heinz, Mar 01 2021
T[n_, k_] := (-1)^n * Sum[If[k == j == 0, 1, (-k)^j] * Binomial[j, n - j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 11}, {k, 0, n}] // Flatten (* Amiram Eldar, Apr 28 2021 *)
T(n, k) = (-1)^n*sum(j=0, n\2, (-k)^(n-j)*binomial(n-j, j));
T(n, k) = (-1)^n*sum(j=0, n, (-k)^j*binomial(j, n-j));
T(n, k) = round(sqrt(k)^n*polchebyshev(n, 2, sqrt(k)/2));
First eight rows: 1 1 2 2 1 3 3 4 -2 4 5 5 4 -10 5 8 10 -3 4 -25 6 13 16 1 -29 14 -49 7 21 28 -8 -24 -78 56 -84 8 Row 4 represents the polynomial p(4,x) = 3 + 4*x - 2*x^2 + 4*x^3, so (T(4,k)) = (3,4,-2,4), k=0..3.
p[1, x_] := 1; p[2, x_] := 1 + 2 x; u[x_] := p[2, x]; v[x_] := 1 - 3x - x^2; p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]] Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]] Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
Triangle begins as: 0; 1, 1; 1, 2, 3; 0, 2, 6, 12; -1, 0, 9, 32, 75; -1, -4, 9, 80, 275, 684; 0, -8, 0, 192, 1000, 3240, 8232; 1, -8, -27, 448, 3625, 15336, 47677, 122368; 1, 0, -81, 1024, 13125, 72576, 276115, 835584, 2158569;
A167925:= func< n,k | Round((Sqrt(k+1))^(n-1)*Evaluate(ChebyshevSecond(n), Sqrt(k+1)/2)) >; [A167925(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 11 2023
(* First program *) m[k_]= {{k,1}, {-1,1}}; v[0, k_]:= {0,1}; v[n_, k_]:= v[n, k]= m[k].v[n-1,k]; T[n_, k_]:= v[n, k][[1]]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* Second program *) A167925[n_, k_]:= (Sqrt[k+1])^(n-1)*ChebyshevU[n-1, Sqrt[k+1]/2]; Table[A167925[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 11 2023 *)
def A167925(n,k): return (sqrt(k+1))^(n-1)*chebyshev_U(n-1, sqrt(k+1)/2) flatten([[A167925(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Sep 11 2023
Comments