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

A104969 Sum of squares of terms in rows of triangle A104967.

Original entry on oeis.org

1, 2, 6, 12, 18, 36, 92, 184, 298, 596, 1444, 2888, 4852, 9704, 22840, 45680, 78490, 156980, 362580, 725160, 1265564, 2531128, 5767688, 11535376, 20366596, 40733192, 91866984, 183733968, 327351336, 654702672, 1464522864, 2929045728
Offset: 0

Views

Author

Paul D. Hanna, Mar 30 2005

Keywords

Crossrefs

Programs

  • Mathematica
    A104967[n_, k_]:= A104967[n, k]= Sum[(-2)^j*Binomial[k+1, j]*Binomial[n-j, k], {j, 0, n-k}];
    A104969[n_]:= A104969[n]= Sum[A104967[n, k]^2, {k,0,n}];
    Table[A104969[n], {n, 0, 50}] (* G. C. Greubel, Jun 09 2021 *)
  • PARI
    {a(n)=local(X=x+x*O(x^n)); sum(k=0,n,polcoeff(polcoeff((1-2*X)/(1-X-X*y*(1-2*X)),n,x),k,y)^2)}
    
  • Sage
    @cached_function
    def A104967(n,k): return sum( (-2)^j*binomial(k+1,j)*binomial(n-j,k) for j in (0..n-k))
    def A104969(n): return sum((A104967(n,k))^2 for k in (0..n))
    [A104969(n) for n in (0..50)] # G. C. Greubel, Jun 09 2021

Formula

a(2*n+1) = 2*a(2*n).
G.f.: A(x) = (1+2*x)*G(x^2) where G(x) is the g.f. of A104970 such that G(x) satisfies: 2*(1+12*x)*G(x) - (1-16*x^2)*deriv(G(x), x) + 4 = 0.
a(n) = Sum_{k=0..n} (A104967(n, k))^2.

A104968 Absolute row sums of triangle A104967.

Original entry on oeis.org

1, 2, 4, 6, 6, 12, 22, 32, 34, 52, 100, 150, 170, 266, 438, 640, 766, 1196, 1996, 2888, 3210, 4994, 8534, 12392, 15106, 22154, 34366, 52134, 62148, 96956, 156396, 217416, 262062, 394164, 643908, 950944, 1150368, 1689176, 2600992, 3767888, 4840338
Offset: 0

Views

Author

Paul D. Hanna, Mar 30 2005

Keywords

Crossrefs

Programs

  • Mathematica
    A104967[n_, k_]:= A104967[n, k]= Sum[(-2)^j*Binomial[k+1, j]*Binomial[n-j, k], {j, 0, n-k}];
    A104968[n_]:= A104968[n]= Sum[Abs[A104967[n, k]], {k,0,n}];
    Table[A104968[n], {n, 0, 50}] (* G. C. Greubel, Jun 09 2021 *)
  • PARI
    {a(n)=local(X=x+x*O(x^n)); sum(k=0,n,abs(polcoeff(polcoeff((1-2*X)/(1-X-X*y*(1-2*X)),n,x),k,y)))}
    
  • Sage
    @cached_function
    def A104967(n,k): return sum( (-2)^j*binomial(k+1,j)*binomial(n-j,k) for j in (0..n-k))
    def A104968(n): return sum( abs(A104967(n,k)) for k in (0..n))
    [A104968(n) for n in (0..50)] # G. C. Greubel, Jun 09 2021

Formula

a(n) = Sum_{k=0..n} abs(A104967(n,k)).

A104970 Sum of squares of terms in even-indexed rows of triangle A104967.

Original entry on oeis.org

1, 6, 18, 92, 298, 1444, 4852, 22840, 78490, 362580, 1265564, 5767688, 20366596, 91866984, 327351336, 1464522864, 5257011066, 23361650484, 84371466636, 372831130344, 1353477992556, 5952169844664, 21704580414936, 95051752387344
Offset: 0

Views

Author

Paul D. Hanna, Mar 30 2005

Keywords

Comments

Sum of squares of terms in odd-indexed rows of triangle A104967 equals twice this sequence.

Crossrefs

Programs

  • Magma
    A104970:= func< n | n eq 0 select 1 else  4^n + (&+[(-1)^j*2^(2*n-2*j-1)*Binomial(2*j+1,j+1): j in [0..n-1]]) >;
    [A104970(n): n in [0..40]]; // G. C. Greubel, Jun 09 2021
    
  • Mathematica
    Flatten[{1,Table[2^(2*n-1)*(2+Sum[(-1)^k*Binomial[2*k+1,k+1]/2^(2*k),{k,0,n-1}]),{n,1,20}]}] (* Vaclav Kotesovec, Oct 28 2012 *)
  • PARI
    {a(n)=local(X=x+x*O(x^(2*n))); sum(k=0,2*n,polcoeff(polcoeff((1-2*X)/(1-X-X*y*(1-2*X)),2*n,x),k,y)^2)}
    
  • Sage
    @cached_function
    def A104967(n,k): return sum( (-2)^j*binomial(k+1,j)*binomial(n-j,k) for j in (0..n-k))
    def A104970(n): return sum((A104967(2*n,k))^2 for k in (0..2*n))
    [A104970(n) for n in (0..50)] # G. C. Greubel, Jun 09 2021

Formula

G.f. A(x) satisfies: 2*(1+12*x)*A(x) - (1-16*x^2)*deriv(A(x), x) + 4 = 0.
a(n) = 2^(2*n-1)*(2 + Sum_{k=0..n-1} (-1)^k*binomial(2*k+1,k+1)/2^(2*k)). - Vaclav Kotesovec, Oct 28 2012

A104219 Triangle read by rows: T(n,k) is number of Schroeder paths of length 2n and having k peaks at height 1, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 11, 7, 3, 1, 45, 28, 12, 4, 1, 197, 121, 52, 18, 5, 1, 903, 550, 237, 84, 25, 6, 1, 4279, 2591, 1119, 403, 125, 33, 7, 1, 20793, 12536, 5424, 1976, 630, 176, 42, 8, 1, 103049, 61921, 26832, 9860, 3206, 930, 238, 52, 9, 1, 518859, 310954, 134913, 49912
Offset: 0

Views

Author

Emeric Deutsch, Mar 14 2005

Keywords

Comments

A Schroeder path is a lattice path starting from (0,0), ending at a point on the x-axis, consisting only of steps U = (1,1), D = (1,-1) and H = (2,0) and never going below the x-axis. Schroeder paths are counted by the large Schroeder numbers (A006318).
This is an example of a Riordan (lower triangular) matrix. See the Shapiro et al. reference quoted under A053121. More precisely, this ordinary convolution triangle belongs to the Bell subgroup of the Riordan group. In the Shapiro et al. notation this is a Bell matrix (g(x), x*g(x)) with g(x) = (1+x-sqrt(1-6*x+x^2))/(4*x), the o.g.f. of A001003(n), n >= 0.
The g.f. for the row polynomials p(n,x) = Sum_{k=0..n} a(n,k)*x^k is g(y)/(1-x*y*g(y)) = (1-2*x*y+y-sqrt(1-6*y+y^2))/(2*y*(2-x-x*y+x^2*y)).
Triangular array in A011117 transposed. - Philippe Deléham, Mar 16 2005

Examples

			Triangle starts:
  [0]   1;
  [1]   1,   1;
  [2]   3,   2,   1;
  [3]  11,   7,   3,  1;
  [4]  45,  28,  12,  4,  1;
  [5] 197, 121,  52, 18,  5, 1;
  [6] 903, 550, 237, 84, 25, 6, 1;
T(3,1)=7 because we have HH(UD),H(UD)H,(UD)HH,UUDD(UD),(UD)UUDD,(UD)UHD, and
UHD(UD) (the peaks UD at height 1 are shown between parentheses).
From _Philippe Deléham_, Dec 04 2015: (Start)
Production matrix begins:
   1,  1;
   2,  1,  1;
   4,  2,  1, 1;
   8,  4,  2, 1, 1;
  16,  8,  4, 2, 1, 1;
  32, 16,  8, 4, 2, 1, 1;
  64, 32, 16, 8, 4, 2, 1, 1; (End)
		

Crossrefs

Row sums are the large Schroeder numbers (A006318). Column 0 yields the little Schroeder numbers (A001003).
Cf. A104967 (matrix inverse), A091370.

Programs

  • Maple
    G:=2/(1+z+sqrt(1-6*z+z^2)-2*z*t): Gser:=simplify(series(G,z=0,13)): P[0]:=1: for n from 1 to 13 do P[n]:=coeff(Gser,z^n) od: for n from 0 to 11 do seq(coeff(t*P[n],t^k),k=1..n+1) od; # yields sequence in triangular form
    # Alternatively:
    T_row := proc(n) local c,f,s;
    c := N -> hypergeom([1-N, N+2], [2], -1);
    f := n -> 1+add(simplify(c(i))*x^i,i=1..n):
    s := j -> coeff(series(f(j)/(1-x*t*f(j)),x,j+1),x,j):
    seq(coeff(s(n),t,j),j=0..n) end:
    seq(T_row(n),n=0..10); # Peter Luschny, Oct 30 2015
  • Mathematica
    T[n_, k_] := (-1)^(n - k) Binomial[n, k] Hypergeometric2F1[k - n, n + 1, k + 2, 2];
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Peter Luschny, Jan 08 2018 *)
  • PARI
    {T(n,k)=local(X=x+x*O(x^n),Y=y+y*O(y^k)); polcoeff(polcoeff(2/(1+X+sqrt(1-6*X+X^2)-2*X*Y),n,x),k,y)} \\ Paul D. Hanna, Mar 30 2005
    
  • Sage
    def A104219_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 [prec(n, k) for k in (1..n)]
    for n in (1..9): print(A104219_row(n)) # Peter Luschny, Mar 16 2016

Formula

G.f.: 2/(1+z+sqrt(1-6*z+z^2)-2*z*t).
Another version of the triangle T(n, k), 0 <= k <= n, read by rows; given by [0, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] = 1; 0, 1; 0, 1, 1; 0, 3, 2, 1; 0, 11, 7, 3, 1; 0, 45, 28, 12, 4, 1; ... where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 16 2005
a(n, k) = (k+1)*hypergeom([1-n+k, n+2], [2], -1) if n > k; a(n, n)=1; a(n, k)=0 if n < k. - Wolfdieter Lang, Sep 12 2005
a(n, k) = ((k+1)/(n-k))*Sum_{p=1..n-k} binomial(n-k, p)*binomial(n+p, p-1) if n > k; a(n, n)=1; a(n, k)=0 if n < k. Proof with Lagrange's inversion theorem based on eq. y = 1+x*(1-2/y) where y=1/g(x), with g(x) the o.g.f. of A001003(n), n >= 0. Use G(k;y):=1/y^(k+1), k >= 0 to find the coefficients a(n, k) of x^n of G(k;1/g(x)). For this method see also the Larcombe and French paper on Catalan convolutions quoted under A033184. - Wolfdieter Lang, Sep 12 2005
G.f.: 1/(1-x*y-x/(1-x-x/(1-x-x/(1-x-x/(1-x-x/(1-... (continued fraction). - Paul Barry, Feb 01 2009
T((m+1)*n+r-1,m*n+r-1)*r/(m*n+r) = Sum_{k=1..n} (k/n)*T((m+1)*n-k-1,m*n-1)*(r+k,r), n >= m > 1, also T(n-1,m-1) = (m/n)*Sum_{k=1..n-m+1} k*A001003(k-1)*T(n-k-1,m-2), n >= m > 1. - Vladimir Kruchinin, Mar 17 2011
T(n, k) = (-1)^(n - k)*binomial(n, k)*hypergeom([k - n, n + 1], [k + 2], 2). - Peter Luschny, Jan 08 2018

A347171 Triangle read by rows where T(n,k) is the sum of Golay-Rudin-Shapiro terms GRS(j) (A020985) for j in the range 0 <= j < 2^n and having binary weight wt(j) = A000120(j) = k.

Original entry on oeis.org

1, 1, 1, 1, 2, -1, 1, 3, -1, 1, 1, 4, 0, 0, -1, 1, 5, 2, -2, 1, 1, 1, 6, 5, -4, 3, -2, -1, 1, 7, 9, -5, 3, -3, 3, 1, 1, 8, 14, -4, 0, 0, 2, -4, -1, 1, 9, 20, 0, -6, 6, -4, 0, 5, 1, 1, 10, 27, 8, -14, 12, -10, 8, -3, -6, -1, 1, 11, 35, 21, -22, 14, -10, 10, -11, 7, 7, 1
Offset: 0

Views

Author

Kevin Ryde, Aug 21 2021

Keywords

Comments

Doche and Mendès France form polynomials P_n(y) = Sum_{j=0..2^n-1} GRS(j) * y^wt(j) and here row n is the coefficients of P_n starting from the constant term, so P_n(y) = Sum_{k=0..n} T(n,k)*y^k. They conjecture that the number of real roots of P_n is A285869(n).
Row sum n is the sum of GRS terms from j = 0 to 2^n-1 inclusive, which Brillhart and Morton (Beispiel 6 page 129) show is A020986(2^n-1) = 2^ceiling(n/2) = A060546(n). The same follows by substituting y=1 in the P_n recurrence or the generating function.

Examples

			Triangle begins
        k=0 k=1 k=2 k=3 k=4 k=5 k=6 k=7
  n=0:   1
  n=1:   1,  1
  n=2:   1,  2, -1
  n=3:   1,  3, -1,  1
  n=4:   1,  4,  0,  0, -1
  n=5:   1,  5,  2, -2,  1,  1
  n=6:   1,  6,  5, -4,  3, -2, -1
  n=7:   1,  7,  9, -5,  3, -3,  3,  1
For T(5,3), those j in the range 0 <= j < 2^5 with wt(j) = 3 are
  j      =  7 11 13 14 19 21 22 25 26 28
  GRS(j) = +1 -1 -1 +1 -1 +1 -1 -1 -1 +1 total -2 = T(5,3)
		

Crossrefs

Cf. A020985 (GRS), A020986 (GRS partial sums), A000120 (binary weight), A285869.
Columns k=0..3: A000012, A001477, A000096, A275874.
Cf. A165326 (main diagonal), A248157 (second diagonal negated).
Cf. A060546 (row sums), A104969 (row sums squared terms).
Cf. A329301 (antidiagonal sums).
Cf. A104967 (rows reversed, up to signs).

Programs

  • PARI
    my(M=Mod('x, 'x^2-(1-'y)*'x-2*'y)); row(n) = Vecrev(subst(lift(M^n),'x,'y+1));

Formula

T(n,k) = T(n-1,k) - T(n-1,k-1) + 2*T(n-2,k-1) for n>=2, and taking T(n,k)=0 if k<0 or k>n.
T(n,k) = (-1)^k * A104967(n,n-k).
Row polynomial P_n(y) = (1-y)*P_{n-1}(y) + 2*y*P_{n-2}(y) for n>=2. [Doche and Mendès France]
G.f.: (1 + 2*x*y)/(1 + x*(y-1) - 2*x^2*y).
Column g.f.: C_k(x) = 1/(1-x) for k=0 and C_k(x) = x^k * (2*x-1)^(k-1) / (1-x)^(k+1) for k>=1.
Showing 1-5 of 5 results.