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

A025565 a(n) = T(n,n-1), where T is array defined in A025564.

Original entry on oeis.org

1, 2, 4, 10, 26, 70, 192, 534, 1500, 4246, 12092, 34606, 99442, 286730, 829168, 2403834, 6984234, 20331558, 59287740, 173149662, 506376222, 1482730098, 4346486256, 12754363650, 37461564504, 110125172682, 323990062452, 953883382354
Offset: 1

Views

Author

Keywords

Comments

a(n+1) is the number of UDU-free paths of n upsteps (U) and n downsteps (D), n>=0. - David Callan, Aug 19 2004
Hankel transform is A120580. - Paul Barry, Mar 26 2010
If interpreted with offset 0, the inverse binomial transform of A006134 - Gary W. Adamson, Nov 10 2007
Also the number of different integer sets { k_1, k_2, ..., k_(i+1) } with Sum_{j=1..i+1} k_j = i and k_j >= 0, see the "central binomial coefficients" (A000984), without all sets in which any two successive k_j and k_(j+1) are zero. See the partition problem eq. 3.12 on p. 19 in my dissertation below. - Eva Kalinowski, Oct 18 2012

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 10*x^4 + 26*x^5 + 70*x^6 + 192*x^7 + 534*x^8 + ...
		

Crossrefs

First column of A097692.
Partial sums of A105696.

Programs

  • Haskell
    a025565 n = a025565_list !! (n-1)
    a025565_list = 1 : f a001006_list [1] where
       f (x:xs) ys = y : f xs (y : ys) where
         y = x + sum (zipWith (*) a001006_list ys)
    -- Reinhard Zumkeller, Mar 30 2012
    
  • Maple
    seq( add(binomial(i-2, k)*(binomial(i-k, k+1)), k=0..floor(i/2)), i=1..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    # Alternatively:
    a := n -> `if`(n=1,1,2*(-1)^n*hypergeom([3/2, 2-n], [2], 4)):
    seq(simplify(a(n)),n=1..28); # Peter Luschny, Jan 30 2017
  • Mathematica
    T[, 0] = 1; T[1, 1] = 2; T[n, k_] /; 0 <= k <= 2n := T[n, k] = T[n-1, k-2] + T[n-1, k-1] + T[n-1, k]; T[, ] = 0;
    a[n_] := T[n-1, n-1];
    Array[a, 30] (* Jean-François Alcover, Jul 30 2018 *)
  • Sage
    def A():
        a, b, n  = 1, 1, 1
        yield a
        while True:
            yield a + b
            n += 1
            a, b = b, ((3*(n-1))*a+(2*n-1)*b)//n
    A025565 = A()
    print([next(A025565) for  in range(28)]) # _Peter Luschny, Jan 30 2017

Formula

G.f.: x*sqrt((1+x)/(1-3*x)).
a(n) = 2*A005773(n-1) for n > 1.
a(n) = |A085455(n-1)| = A025577(n) - A025577(n-1) = A002426(n) + A002426(n-1).
Sum_{i=0..n} Sum_{j=0..i} (-1)^(n-i)*a(j)*a(i-j) = 3^n. - Mario Catalani (mario.catalani(AT)unito.it), Jul 02 2003
a(1) = 1, a(n) = M(n-1) + Sum_{k=1..n-1} M(k-1)*a(n-k) with M=A001006, the Motzkin Numbers. - Reinhard Zumkeller, Mar 30 2012
D-finite with recurrence: (-n+1)*a(n) +2*(n-1)*a(n-1) +3*(n-3)*a(n-2)=0. - R. J. Mathar, Dec 02 2012
G.f.: G(0), where G(k) = 1 + 4*x*(4*k+1)/( (1+x)*(4*k+2) - x*(1+x)*(4*k+2)*(4*k+3)/(x*(4*k+3) + (1+x)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 26 2013
a(n) = n*hypergeom([2-n, 1/2-n/2, 1-n/2], [2, -n], 4). - Peter Luschny, Jul 12 2016
a(n) = (-1)^n*2*hypergeom([3/2, 2-n], [2], 4) for n > 1. - Peter Luschny, Jan 30 2017

Extensions

Incorrect statement related to A000984 (see A002426) and duplicate of the g.f. removed by R. J. Mathar, Oct 16 2009
Edited by R. J. Mathar, Aug 09 2010

A098479 Expansion of 1/sqrt((1-x)^2 - 4*x^3).

Original entry on oeis.org

1, 1, 1, 3, 7, 13, 27, 61, 133, 287, 633, 1407, 3121, 6943, 15517, 34755, 77959, 175213, 394499, 889461, 2007963, 4538485, 10269247, 23258881, 52726599, 119627977, 271624315, 617180533, 1403272799, 3192557561, 7267485523, 16552454205, 37718893317, 85992506271
Offset: 0

Views

Author

Paul Barry, Sep 10 2004

Keywords

Comments

1/sqrt((1-x)^2-4*r*x^3) expands to Sum_{k=0..floor(n/2)} binomial(n-k,k)*binomial(n-2*k,k)*r^k.
Hankel transform is A120580. - Paul Barry, Sep 19 2008
From Joerg Arndt, Jul 01 2011: (Start)
Apparently the number of lattice paths from (0,0) to (n,n) using steps (3,0), (0,3), (1,1).
It appears that 1/sqrt((1-x)^2-4*x^s) is the g.f. for lattice paths from (0,0) to (n,n) using steps (s,0), (0,s), (1,1).
Apparently the number of lattice paths from (0,0) to (n,n) using steps (1,2), (2,1), (1,1). (End)
Diagonal of rational functions 1/(1 - (x*y + x*y^2 + x^2*y)), 1/(1 - (x*y + x^3 + y^3)). - Gheorghe Coserea, Aug 31 2018
Diagonal of the rational function 1 / ((1-x)*(1-y) - x^2*y^3). - Seiichi Manyama, Apr 29 2025

Examples

			From _Joerg Arndt_, Jul 01 2011: (Start)
The triangle of lattice paths from (0,0) to (n,k) using steps (1,2), (2,1), (1,1) begins
  1;
  0, 1;
  0, 1, 1;
  0, 0, 2, 3;
  0, 0, 1, 3, 7;
  0, 0, 0, 3, 7, 13;
  0, 0, 0, 1, 6, 17, 27;
  0, 0, 0, 0, 4, 14, 36, 61;
The triangle of lattice paths from (0,0) to (n,k) using steps (3,0), (0,3), (1,1) begins
  1;
  0, 1;
  0, 0, 1;
  1, 0, 0, 3;
  0, 2, 0, 0,  7;
  0, 0, 3, 0,  0, 13;
  1, 0, 0, 7,  0,  0, 27;
  0, 3, 0, 0, 17,  0,  0, 61;
The diagonals of both appear to be this sequence.  (End)
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[ Binomial[n-k, k]*Binomial[n-2k, k], {k, 0, n/2}]; Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Jan 07 2013, from 1st formula *)
    CoefficientList[Series[1/Sqrt[(1-x)^2-4x^3],{x,0,40}],x] (* Harvey P. Dale, Aug 13 2024 *)
  • PARI
    /* as lattice paths, assuming the first comment is true */
    /* same as in A092566 but use either of the following */
    steps=[[3,0], [0,3], [1,1]];
    steps=[[1,1], [1,2], [2,1]];
    /* Joerg Arndt, Jul 01 2011 */
    
  • Python
    from sympy import binomial
    def a(n): return sum(binomial(n - k, k) * binomial(n - 2*k, k) for k in range(n//2 + 1))
    print([a(n) for n in range(31)]) # Indranil Ghosh, Apr 18 2017

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*binomial(n-2*k, k).
D-finite with recurrence: n*a(n) + (-2*n+1)*a(n-1) + (n-1)*a(n-2) + 2*(-2*n+3)*a(n-3) = 0. - R. J. Mathar, Nov 30 2012
G.f.: 1/(1 - x - 2*x^3/(1 - x - x^3/(1 - x - x^3/(1 - x - x^3/(1 - ...))))), a continued fraction. - Ilya Gutkovskiy, Nov 19 2021
a(n) ~ 1 / (sqrt((1-r)*(3-r)) * sqrt(Pi*n) * r^n), where r = 0.432040800333095... is the real root of the equation -1 + 2*r - r^2 + 4*r^3 = 0. - Vaclav Kotesovec, Jun 05 2022

A120582 Hankel transform of Sum_{k=0..floor(n/2)} binomial(2*k, k).

Original entry on oeis.org

1, 2, 0, 0, -16, -32, -64, -128, 0, 0, 1024, 2048, 4096, 8192, 0, 0, -65536, -131072, -262144, -524288, 0, 0, 4194304, 8388608, 16777216, 33554432, 0, 0, -268435456, -536870912, -1073741824, -2147483648, 0, 0, 17179869184, 34359738368, 68719476736, 137438953472, 0, 0, -1099511627776
Offset: 0

Views

Author

Paul Barry, Jun 15 2006

Keywords

Comments

Hankel transform of A100066(n+1).

Crossrefs

Programs

  • Magma
    I:=[1,2,0,0]; [n le 4 select I[n] else 4*Self(n-2) -16*Self(n-4): n in [1..51]]; // G. C. Greubel, Jun 08 2022
    
  • Mathematica
    LinearRecurrence[{0,4,0,-16}, {1,2,0,0}, 51] (* G. C. Greubel, Jun 08 2022 *)
  • SageMath
    def C(n): return floor(chebyshev_U(n, 1/2))
    def A120582(n): return 2^n*( ((n+1)%2)*(C(n/2) - C((n-2)/2)) + (n%2)*C((n+1)/2) )
    [A120582(n) for n in (0..50)] # G. C. Greubel, Jun 08 2022

Formula

a(n) = 2^n*(-sqrt(3)*cos(5*Pi*n/6 + Pi/3)/6 + (sqrt(3)/3 - 1/2)*sin(5*Pi*n/6 + Pi/3) + (sqrt(3)/3 + 1/2)*cos(Pi*n/6 + Pi/6) + sqrt(3)*sin(Pi*n/6 + Pi/6)/6).
G.f.: (1-2*x)*(1+2*x)^2/(1 - 4*x^2 + 16*x^4). - Colin Barker, Jun 27 2013
a(n) = 2^(n-1)*( (1+(-1)^n)*(ChebyshevU(n/2, 1/2) - ChebyshevU((n-2)/2, 1/2)) + (1 -(-1)^n)*ChebyshevU((n+1)/2, 1/2)). - G. C. Greubel, Jun 08 2022

A120581 Hankel transform of sum{k=0..n, C(2k,k)*2^k}.

Original entry on oeis.org

1, 4, -64, -28672, -17825792, -24696061952, -4398046511104, 6413125869375586304, 1279761316857673852911616, 565738597953418785628899770368, 372547299599873882347063111621541888, -5264848781000759906705331926184317767647232
Offset: 0

Views

Author

Paul Barry, Jun 15 2006

Keywords

Crossrefs

Cf. A120580.

Formula

a(n)=4^(n+C(n,2))(-1)^n*sum{k=0..n, C(n+k,2k)(-2)^(n-k)}; a(n)=8^n*4^C(n,2)*sum{k=0..n, C(n+k,2k)(-2)^(-k)}; a(n)=4^n*4^C(n,2)(-1)^n*A087168(n);
Showing 1-4 of 4 results.