cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A034869 Right half of Pascal's triangle.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 6, 4, 1, 10, 5, 1, 20, 15, 6, 1, 35, 21, 7, 1, 70, 56, 28, 8, 1, 126, 84, 36, 9, 1, 252, 210, 120, 45, 10, 1, 462, 330, 165, 55, 11, 1, 924, 792, 495, 220, 66, 12, 1, 1716, 1287, 715, 286, 78, 13, 1, 3432, 3003, 2002, 1001, 364, 91, 14, 1
Offset: 0

Views

Author

Keywords

Comments

From R. J. Mathar, May 13 2006: (Start)
Also flattened table of the expansion coefficients of x^n in Chebyshev Polynomials T_k(x) of the first kind:
x^n is 2^(1-n) multiplied by the sum of floor(1+n/2) terms using only terms T_k(x) with even k if n even, only terms T_k(x) with odd k if n is odd and halving the coefficient a(..) in front of any T_0(x):
x^0=2^(1-0) a(0)/2 T_0(x)
x^1=2^(1-1) a(1) T_1(x)
x^2=2^(1-2) [a(2)/2 T_0(x)+a(3) T_2(x)]
x^3=2^(1-3) [a(4) T_1(x)+a(5) T_3(x)]
x^4=2^(1-4) [a(6)/2 T_0(x)+a(7) T_2(x) +a(8) T_4(x)]
x^5=2^(1-5) [a(9) T_1(x)+a(10) T_3(x) +a(11) T_5(x)]
x^6=2^(1-6) [a(12)/2 T_0(x)+a(13) T_2(x) +a(14) T_4(x) +a(15) T_6(x)]
x^7=2^(1-7) [a(16) T_1(x)+a(17) T_3(x) +a(18) T_5(x) +a(19) T_7(x)]" (End)
T(n,k) = A034868(n,floor(n/2)-k), k = 0..floor(n/2). - Reinhard Zumkeller, Jul 27 2012
Rows are binomial(r-1,(2r+1-(-1)^r)\4 -n ) where r is the row and n is the term. Columns are binomial(2m+c-3,m-1) where c is the column and m is the term. - Anthony Browne, May 17 2016

Examples

			The table starts:
  1
  1
  2 1
  3 1
  6 4 1
  ...
		

Crossrefs

Cf. A007318, A008619 (row lengths).
Cf. A110654.
Cf. A034868 (left half), A014413, A014462, A027306 (row sums).
Columns k=0-1-2-3-4 give: A001405, A037955, A037956, A037957, A037958.

Programs

  • Haskell
    a034869 n k = a034869_tabf !! n !! k
    a034869_row n = a034869_tabf !! n
    a034869_tabf = [1] : f 0 [1] where
       f 0 us'@(_:us) = ys : f 1 ys where
                        ys = zipWith (+) us' (us ++ [0])
       f 1 vs@(v:_) = ys : f 0 ys where
                      ys = zipWith (+) (vs ++ [0]) ([v] ++ vs)
    -- Reinhard Zumkeller, improved Dec 21 2015, Jul 27 2012
    
  • Maple
    for n from 0 to 60 do for j from n mod 2 to n by 2 do print( binomial(n,(n-j)/2) ); od; od; # R. J. Mathar, May 13 2006
    # Second program:
    egf:= k-> BesselI(2*k, 2*x) + BesselI(2*k+1, 2*x):
    A034869:= (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n):
    seq(print(seq(A034869(n, k), k=0..iquo(n, 2))), n=0..14); # Mélika Tebni, Sep 05 2024
  • Mathematica
    Table[Binomial[n, k], {n, 0, 14}, {k, Ceiling[n/2], n}] // Flatten (* Michael De Vlieger, May 19 2016 *)
  • PARI
    for(n=0, 14, for(k=ceil(n/2), n, print1(binomial(n, k),", ");); print();) \\ Indranil Ghosh, Mar 31 2017
    
  • Python
    import math
    from sympy import binomial
    for n in range(15):
        print([binomial(n, k) for k in range(math.ceil(n/2), n + 1)]) # Indranil Ghosh, Mar 31 2017

Formula

E.g.f. of column k: BesselI(2*k,2*x) + BesselI(2*k+1,2*x). - Mélika Tebni, Sep 05 2024

Extensions

Keyword fixed and example added by Franklin T. Adams-Watters, May 27 2010

A101491 Triangle T(n,k), read by rows: number of Knödel walks starting at 0, ending at k, with n steps.

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 1, 3, 1, 1, 5, 4, 4, 1, 1, 5, 10, 5, 5, 1, 1, 15, 15, 15, 6, 6, 1, 1, 20, 35, 21, 21, 7, 7, 1, 1, 50, 56, 56, 28, 28, 8, 8, 1, 1, 76, 126, 84, 84, 36, 36, 9, 9, 1, 1, 176, 210, 210, 120, 120, 45, 45, 10, 10, 1, 1, 286, 462, 330, 330, 165, 165, 55, 55, 11, 11, 1, 1
Offset: 0

Views

Author

Ralf Stephan, Jan 21 2005

Keywords

Examples

			Triangle begins:
  1,
  0,1,
  2,1,1,
  1,3,1,1,
  5,4,4,1,1,
  5,10,5,5,1,1,
  15,15,15,6,6,1,1,
  20,35,21,21,7,7,1,1,
  50,56,56,28,28,8,8,1,1,
  76,126,84,84,36,36,9,9,1,1,
  ...
		

Crossrefs

Left-hand columns include A086905, A037952, A037955, A037951, A037956, A037953, A037957, A037954, A037958.

Programs

  • Mathematica
    A101491[n_, k_] := If[k == 0, Sum[(-1)^(n - i)*Binomial[i, BitShiftRight[i]], {i, 0, n}], Binomial[n, BitShiftRight[n - k]]];
    Table[A101491[n, k], {n, 0, 15}, {k, 0, n}] (* Paolo Xausa, Jan 17 2025 *)
  • PARI
    T(n, k) = if (k==0, sum(i=0, n, (-1)^(n-i)*binomial(i, i\2)), binomial(n, (n-k)\2));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print();); \\ Michel Marcus, Dec 04 2016

Formula

G.f.: r(z)/(z*(1+z)*(1-r(z)))*(1+x*z*r(z))/(1-x*r(z)), with r(z) = (1-sqrt(1-4*z^2))/(2*z). Then the g.f. of the k-th column is r(z)^(k+1)/(z*(1-r(z))).
T(n, k) = Sum_{i=0..n} (-1)^(n-i)*C(i, floor(i/2)) for k=0, otherwise T(n, k) = C(n, floor((n-k)/2)).

A335322 Triangle read by rows: T(n, k) = binomial(n, floor((n+k+1)/2)) with k <= n.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 10, 5, 5, 1, 1, 15, 15, 6, 6, 1, 1, 35, 21, 21, 7, 7, 1, 1, 56, 56, 28, 28, 8, 8, 1, 1, 126, 84, 84, 36, 36, 9, 9, 1, 1, 210, 210, 120, 120, 45, 45, 10, 10, 1, 1, 462, 330, 330, 165, 165, 55, 55, 11, 11, 1, 1, 792, 792, 495, 495, 220, 220, 66, 66, 12, 12, 1, 1
Offset: 1

Views

Author

Stefano Spezia, May 31 2020

Keywords

Comments

T(n, k) is a tight upper bound of the cardinality of an intersecting Sperner family or antichain of the set {1, 2,..., n}, where every collection of pairwise independent subsets is characterized by an intersection of cardinality at least k (see Theorem 1.3 in Wong and Tay).
Equals A061554 with the first row of the array (resp. the first column of the triangle) removed. - Georg Fischer, Jul 26 2023

Examples

			The triangle T(n, k) begins
n\k|  1   2   3   4   5   6   7   8
---+-------------------------------
1  |  1
2  |  1   1
3  |  3   1   1
4  |  4   4   1   1
5  | 10   5   5   1   1
6  | 15  15   6   6   1   1
7  | 35  21  21   7   7   1   1
8  | 56  56  28  28   8   8   1   1
...
		

Crossrefs

Cf. A037951 (k=3), A037952 (k=1), A037953 (k=5), A037954 (k=7), A037955 (k=2), A037956 (k=4), A037957 (k=6), A037958 (k=8), A045621 (row sums).

Programs

  • Mathematica
    T[n_,k_]:=Binomial[n,Floor[(n+k+1)/2]]; Table[T[n,k],{n,12},{k,n}]//Flatten
  • PARI
    T(n, k) = binomial(n, (n+k+1)\2);
    vector(10, n, vector(n, k, T(n, k))) \\ Michel Marcus, Jun 01 2020

Formula

T(n, k) = A007318(n, A004526(n+k+1)) with k <= n.
Showing 1-3 of 3 results.