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-2 of 2 results.

A035317 Pascal-like triangle associated with A000670.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 4, 7, 6, 3, 1, 5, 11, 13, 9, 3, 1, 6, 16, 24, 22, 12, 4, 1, 7, 22, 40, 46, 34, 16, 4, 1, 8, 29, 62, 86, 80, 50, 20, 5, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 1, 11, 56, 174, 367, 553, 610, 496, 295, 125
Offset: 0

Views

Author

Keywords

Comments

From Johannes W. Meijer, Jul 20 2011: (Start)
The triangle sums, see A180662 for their definitions, link this "Races with Ties" triangle with several sequences, see the crossrefs. Observe that the Kn4 sums lead to the golden rectangle numbers A001654 and that the Fi1 and Fi2 sums lead to the Jacobsthal sequence A001045.
The series expansion of G(x, y) = 1/((y*x-1)*(y*x+1)*((y+1)*x-1)) as function of x leads to this sequence, see the second Maple program. (End)
T(2n,k) = the number of hatted frog arrangements with k frogs on the 2xn grid. See the linked paper "Frogs, hats and common subsequences". - Chris Cox, Apr 12 2024

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  2;
  1,  3,  4,   2;
  1,  4,  7,   6,   3;
  1,  5, 11,  13,   9,   3;
  1,  6, 16,  24,  22,  12,   4;
  1,  7, 22,  40,  46,  34,  16,   4;
  1,  8, 29,  62,  86,  80,  50,  20,  5;
  1,  9, 37,  91, 148, 166, 130,  70, 25,  5;
  1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6;
  ...
		

Crossrefs

Row sums are A000975, diagonal sums are A080239.
Central terms are A014300.
Similar to the triangles A059259, A080242, A108561, A112555.
Cf. A059260.
Triangle sums (see the comments): A000975 (Row1), A059841 (Row2), A080239 (Kn11), A052952 (Kn21), A129696 (Kn22), A001906 (Kn3), A001654 (Kn4), A001045 (Fi1, Fi2), A023435 (Ca2), Gi2 (A193146), A190525 (Ze2), A193147 (Ze3), A181532 (Ze4). - Johannes W. Meijer, Jul 20 2011
Cf. A181971.

Programs

  • Haskell
    a035317 n k = a035317_tabl !! n !! k
    a035317_row n = a035317_tabl !! n
    a035317_tabl = map snd $ iterate f (0, [1]) where
       f (i, row) = (1 - i, zipWith (+) ([0] ++ row) (row ++ [i]))
    -- Reinhard Zumkeller, Jul 09 2012
    
  • Maple
    A035317 := proc(n,k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
    A035317 := proc(n,k): coeff(coeftayl(1/((y*x-1)*(y*x+1)*((y+1)*x-1)), x=0, n), y, k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
  • Mathematica
    t[n_, k_] := (-1)^k*(((-1)^k*(n+2)!*Hypergeometric2F1[1, n+3, k+2, -1])/((k+1)!*(n-k+1)!) + 2^(k-n-2)); Flatten[ Table[ t[n, k], {n, 0, 11}, {k, 0, n}]] (* Jean-François Alcover, Dec 14 2011, after Johannes W. Meijer *)
  • PARI
    {T(n,k)=if(n==k,(n+2)\2,if(k==0,1,if(n>k,T(n-1,k-1)+T(n-1,k))))}
    for(n=0,12,for(k=0,n,print1(T(n,k),","));print("")) \\ Paul D. Hanna, Jul 18 2012
    
  • Sage
    def A035317_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n+2, k) for k in (1..n)]
    for n in (1..11): print(A035317_row(n)) # Peter Luschny, Mar 16 2016

Formula

T(n,k) = Sum_{j=0..floor(n/2)} binomial(n-2j, k-2j). - Paul Barry, Feb 11 2003
From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..k}((-1)^(i+k) * binomial(i+n-k+1,i)). (Mendelson)
T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = floor(n/2) + 1. (Mendelson)
Sum_{k = 0..n}((-1)^k * (n-k+1)^n * T(n, k)) = A000670(n). (Mendelson)
T(n, n-k) = A128176(n, k); T(n+k, n-k) = A158909(n, k); T(2*n-k, k) = A092879(n, k). (End)
T(2*n+1,n) = A014301(n+1); T(2*n+1,n+1) = A026641(n+1). - Reinhard Zumkeller, Jul 19 2012

Extensions

More terms from James Sellers

A128175 Binomial transform of A128174.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 4, 3, 1, 8, 8, 7, 4, 1, 16, 16, 15, 11, 5, 1, 32, 32, 31, 26, 16, 6, 1, 64, 64, 63, 57, 42, 22, 7, 1, 128, 128, 127, 120, 99, 64, 29, 8, 1, 256, 256, 255, 247, 219, 163, 93, 37, 9, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 17 2007

Keywords

Comments

Row sums = A045623: (1, 2, 5, 12, 28, 64, 144, ...).
Riordan array ((1-x)/(1-2x),x/(1-x)). - Paul Barry, Oct 02 2010
Fusion of polynomial sequences p(n,x) = (x+1)^n and q(n,x) = x^n + x^(n-1) + ... + x + 1; see A193722 for the definition of fusion. - Clark Kimberling, Aug 04 2011

Examples

			First few rows of the triangle:
   1;
   1,  1;
   2,  2,  1;
   4,  4,  3,  1;
   8,  8,  7,  4,  1;
  16, 16, 15, 11,  5,  1;
  32, 32, 31, 26, 16,  6,  1;
  64, 64, 63, 57, 42, 22,  7,  1;
  ...
From _Paul Barry_, Oct 02 2010: (Start)
Production matrix is
  1, 1;
  1, 1, 1;
  0, 0, 1, 1;
  0, 0, 0, 1, 1;
  0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 1, 1;
  ...
Matrix logarithm is
  0;
  1, 0;
  1, 2, 0;
  1, 1, 3, 0;
  1, 1, 1, 4, 0;
  1, 1, 1, 1, 5, 0;
  1, 1, 1, 1, 1, 6, 0;
  1, 1, 1, 1, 1, 1, 7, 0;
  1, 1, 1, 1, 1, 1, 1, 8, 0;
  1, 1, 1, 1, 1, 1, 1, 1, 9,  0;
  1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 0;
  ... (End)
.
First few rows of the array:
  1, 1,  2,  4,  8,  16, ...
  1, 2,  4,  8, 16,  32, ...
  1, 3,  7, 15, 31,  63, ...
  1, 4, 11, 26, 57, 120, ...
  1, 5, 16, 42, 99, 219, ...
  ...
		

Crossrefs

Programs

  • Maple
    A193820 := (n,k) -> `if`(k=0 or n=0, 1, A193820(n-1,k-1)+A193820(n-1,k));
    A128175 := (n,k) -> A193820(n-1,n-k);
    seq(print(seq(A128175(n,k),k=0..n)),n=0..10); # Peter Luschny, Jan 22 2012
  • Mathematica
    z = 10; a = 1; b = 1;
    p[n_, x_] := (a*x + b)^n
    q[0, x_] := 1
    q[n_, x_] := x*q[n - 1, x] + 1; q[n_, 0] := q[n, x] /. x -> 0;
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]   (* A193820 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]  (* A128175 *)
    (* Clark Kimberling, Aug 06 2011 *)
    (* function dotTriangle[] is defined in A128176 *)
    a128175[r_] := dotTriangle[Binomial, If[EvenQ[#1 + #2], 1, 0]&, r]
    TableForm[a128174[7]] (* triangle *)
    Flatten[a128174[9]] (* data *) (* Hartmut F. W. Hoft, Mar 15 2017 *)

Formula

A007318 * A128174 as infinite lower triangular matrices.
Antidiagonals of an array in which the first row = (1, 1, 2, 4, 8, 16, ...); and (n+1)-th row = partial sums of n-th row.
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(4 + 4*x + 3*x^2/2! + x^3/3!) = 4 + 8*x + 15*x^2/2! + 26*x^3/3! + 42*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 22 2014
T(n, k) = Sum_{i=0..floor((n-k)/2)} binomial(n-1, k-1+2*i). - Werner Schulte, Mar 05 2025
T(n, k) = binomial(n-1, k-1)*hypergeom([1, (k-n)/2, (1+k-n)/2], [(1+k)/2, k/2], 1). - Stefano Spezia, Mar 07 2025
Showing 1-2 of 2 results.