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-10 of 16 results. Next

A171589 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A104455.

Original entry on oeis.org

1, 4, 1, 17, 8, 1, 77, 50, 12, 1, 371, 290, 99, 16, 1, 1890, 1647, 703, 164, 20, 1, 10095, 9366, 4644, 1380, 245, 24, 1, 56040, 53853, 29592, 10434, 2385, 342, 28, 1, 320795, 314234, 185411, 74084, 20345, 3782, 455, 32, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 12 2009

Keywords

Comments

Equal to B*A171568 = A125906*B^(-1), B = A007318.

Examples

			Triangle begins :
1
4, 1
17, 8, 1
77, 50, 12, 1
371, 290, 99, 16, 1
1890, 1647, 703, 164, 20, 1
10095, 9366, 4644, 1380, 245, 24, 1
Production matrix begins
4, 1
1, 4, 1
1, 1, 4, 1
1, 1, 1, 4, 1
1, 1, 1, 1, 4, 1
1, 1, 1, 1, 1, 4, 1
1, 1, 1, 1, 1, 1, 4, 1
1, 1, 1, 1, 1, 1, 1, 4, 1
... - _Philippe Deléham_, Mar 05 2013
		

Crossrefs

Formula

T(n,0)-T(n,1)=3^n.
T(n,k) = T(n-1,k-1) + 4*T(n-1,k) + sum_{i, i>=0} T(n-1,k+1+i). - Philippe Deléham, Feb 23 2012

A007317 Binomial transform of Catalan numbers.

Original entry on oeis.org

1, 2, 5, 15, 51, 188, 731, 2950, 12235, 51822, 223191, 974427, 4302645, 19181100, 86211885, 390248055, 1777495635, 8140539950, 37463689775, 173164232965, 803539474345, 3741930523740, 17481709707825, 81912506777200, 384847173838501, 1812610804416698
Offset: 1

Views

Author

Keywords

Comments

Partial sums of A002212 (the restricted hexagonal polyominoes with n cells). Number of Schroeder paths (i.e., consisting of steps U=(1,1),D=(1,-1),H=(2,0) and never going below the x-axis) from (0,0) to (2n-2,0), with no peaks at even level. Example: a(3)=5 because among the six Schroeder paths from (0,0) to (4,0) only UUDD has a peak at an even level. - Emeric Deutsch, Dec 06 2003
Number of binary trees of weight n where leaves have positive integer weights. Non-commutative Non-associative version of partitions of n. - Michael Somos, May 23 2005
Appears also as the number of Euler trees with total weight n (associated with even switching class of matrices of order 2n). - David Garber, Sep 19 2005
Number of symmetric hex trees with 2n-1 edges; also number of symmetric hex trees with 2n-2 edges. A hex tree is a rooted tree where each vertex has 0, 1, or 2 children and, when only one child is present, it is either a left child, or a median child, or a right child (name due to an obvious bijection with certain tree-like polyhexes; see the Harary-Read reference). A hex tree is symmetric if it is identical with its reflection in a bisector through the root. - Emeric Deutsch, Dec 19 2006
The Hankel transform of [1, 2, 5, 15, 51, 188, ...] is [1, 1, 1, 1, 1, ...], see A000012 ; the Hankel transform of [2, 5, 15, 51, 188, 731, ...] is [2, 5, 13, 34, 89, ...], see A001519. - Philippe Deléham, Dec 19 2006
a(n) = number of 321-avoiding partitions of [n]. A partition is 321-avoiding if the permutation obtained from its canonical form (entries in each block listed in increasing order and blocks listed in increasing order of their first entries) is 321-avoiding. For example, the only partition of [5] that fails to be 321-avoiding is 15/24/3 because the entries 5,4,3 in the permutation 15243 form a 321 pattern. - David Callan, Jul 22 2008
The sequence 1,1,2,5,15,51,188,... has Hankel transform A001519. - Paul Barry, Jan 13 2009
From Gary W. Adamson, May 17 2009: (Start)
Equals INVERT transform of A033321: (1, 1, 2, 6, 21, 79, 311, ...).
Equals INVERTi transform of A002212: (1, 3, 10, 36, 137, ...).
Convolved with A026378, (1, 4, 17, 75, 339, ...) = A026376: (1, 6, 30, 144, ...)
(End)
a(n) is the number of vertices of the composihedron CK(n). The composihedra are a sequence of convex polytopes used to define maps of certain homotopy H-spaces. They are cellular quotients of the multiplihedra and cellular covers of the cubes. - Stefan Forcey (sforcey(AT)gmail.com), Dec 17 2009
a(n) is the number of Motzkin paths of length n-1 in which the (1,0)-steps at level 0 come in 2 colors and those at a higher level come in 3 colors. Example: a(4)=15 because we have 2^3 = 8 paths of shape UHD, 2 paths of shape HUD, 2 paths of shape UDH, and 3 paths of shape UHD; here U=(1,1), H=(1,0), and D=(1,-1). - Emeric Deutsch, May 02 2011
REVERT transform of (1, 2, -3, 5, -8, 13, -21, 34, ... ) where the entries are Fibonacci numbers, A000045. Equivalently, coefficients in the series reversion of x(1-x)/(1+x-x^2). This means that the substitution of the gf (1-x-(1-6x+5x^2)^(1/2))/(2(1-x)) for x in x(1-x)/(1+x-x^2) will simplify to x. - David Callan, Nov 11 2012
The number of plane trees with nodes that have positive integer weights and whose total weight is n. - Brad R. Jones, Jun 12 2014
From Tom Copeland, Nov 02 2014: (Start)
Let P(x) = x/(1+x) with comp. inverse Pinv(x) = x/(1-x) = -P[-x], and C(x)= [1-sqrt(1-4x)]/2, an o.g.f. for the shifted Catalan numbers A000108, with inverse Cinv(x) = x * (1-x).
Fin(x) = P[C(x)] = C(x)/[1 + C(x)] is an o.g.f. for the Fine numbers, A000957 with inverse Fin^(-1)(x) = Cinv[Pinv(x)] = Cinv[-P(-x)].
Mot(x) = C[P(x)] = C[-Pinv(-x)] gives an o.g.f. for shifted A005043, the Motzkin or Riordan numbers with comp. inverse Mot^(-1)(x) = Pinv[Cinv(x)] = (x - x^2) / (1 - x + x^2) (cf. A057078).
BTC(x) = C[Pinv(x)] gives A007317, a binomial transform of the Catalan numbers, with BTC^(-1)(x) = P[Cinv(x)] = (x-x^2) / (1 + x - x^2).
Fib(x) = -Fin[Cinv(Cinv(-x))] = -P[Cinv(-x)] = x + 2 x^2 + 3 x^3 + 5 x^4 + ... = (x+x^2)/[1-x-x^2] is an o.g.f. for the shifted Fibonacci sequence A000045, so the comp. inverse is Fib^(-1)(x) = -C[Pinv(-x)] = -BTC(-x) and Fib(x) = -BTC^(-1)(-x).
Generalizing to P(x,t) = x /(1 + t*x) and Pinv(x,t) = x /(1 - t*x) = -P(-x,t) gives other relations to lattice paths, such as the o.g.f. for A091867, C[P[x,1-t]], and that for A104597, Pinv[Cinv(x),t+1].
(End)
Starting with offset 0, a(n) is also the number of Schröder paths of semilength n avoiding UH (an up step directly followed by a long horizontal step). Example: a(2)=5 because among the six possible Schröder paths of semilength 2 only UHD contains UH. - Valerie Roitner, Jul 23 2020

Examples

			a(3)=5 since {3, (1+2), (1+(1+1)), (2+1), ((1+1)+1)} are the five weighted binary trees of weight 3.
G.f. = x + 2*x^2 + 5*x^3 + 15*x^4 + 51*x^5 + 188*x^6 + 731*x^7 + 2950*x^8 + 12235*x^9 + ... _Michael Somos_, Jan 17 2018
		

References

  • J. Brunvoll et al., Studies of some chemically relevant polygonal systems: mono-q-polyhexes, ACH Models in Chem., 133 (3) (1996), 277-298, Eq. 15.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A181768 for another version. - N. J. A. Sloane, Nov 12 2010
First column of triangle A104259. Row sums of absolute values of A091699.
Number of vertices of multiplihedron A121988.
m-th binomial transform of the Catalan numbers: A126930 (m = -2), A005043 (m = -1), A000108 (m = 0), A064613 (m = 2), A104455 (m = 3), A104498 (m = 4) and A154623 (m = 5).

Programs

  • Maple
    G := (1-sqrt(1-4*z/(1-z)))*1/2: Gser := series(G, z = 0, 30): seq(coeff(Gser, z, n), n = 1 .. 26); # Emeric Deutsch, Aug 12 2007
    seq(round(evalf(JacobiP(n-1,1,-n-1/2,9)/n,99)),n=1..25); # Peter Luschny, Sep 23 2014
  • Mathematica
    Rest@ CoefficientList[ InverseSeries[ Series[(y - y^2)/(1 + y - y^2), {y, 0, 26}], x], x] (* then A(x)=y(x); note that InverseSeries[Series[y-y^2, {y, 0, 24}], x] produces A000108(x) *) (* Len Smiley, Apr 10 2000 *)
    Range[0, 25]! CoefficientList[ Series[ Exp[ 3x] (BesselI[0, 2x] - BesselI[1, 2x]), {x, 0, 25}], x] (* Robert G. Wilson v, Apr 15 2011 *)
    a[n_] := Sum[ Binomial[n, k]*CatalanNumber[k], {k, 0, n}]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Aug 07 2012 *)
    Rest[CoefficientList[Series[3/2 - (1/2) Sqrt[(1 - 5 x)/(1 - x)], {x, 0, 40}], x]] (* Vincenzo Librandi, Nov 03 2014 *)
    Table[Hypergeometric2F1[1/2, -n+1, 2, -4], {n, 1, 30}] (* Vaclav Kotesovec, May 12 2022 *)
  • PARI
    {a(n) = my(A); if( n<2, n>0, A=vector(n); for(j=1,n, A[j] = 1 + sum(k=1,j-1, A[k]*A[j-k])); A[n])}; /* Michael Somos, May 23 2005 */
    
  • PARI
    {a(n) = if( n<1, 0, polcoeff( serreverse( (x - x^2) / (1 + x - x^2) + x * O(x^n)), n))}; /* Michael Somos, May 23 2005 */
    
  • PARI
    /* Offset = 0: */ {a(n)=local(A=1+x);for(i=1,n, A=sum(m=0,n, x^m*sum(k=0,m,A^k)+x*O(x^n))); polcoeff(A,n)} \\ Paul D. Hanna

Formula

(n+2)*a(n+2) = (6n+4)*a(n+1) - 5n*a(n).
G.f.: 3/2-(1/2)*sqrt((1-5*x)/(1-x)) [Gessel-Kim]. - N. J. A. Sloane, Jul 05 2014
G.f. for sequence doubled: (1/(2*x))*(1+x-(1-x)^(-1)*(1-x^2)^(1/2)*(1-5*x^2)^(1/2)).
a(n) = hypergeom([1/2, -n], [2], -4), n=0, 1, 2...; Integral representation as n-th moment of a positive function on a finite interval of the positive half-axis: a(n)=int(x^n*sqrt((5-x)/(x-1))/(2*Pi), x=1..5), n=0, 1, 2... This representation is unique. - Karol A. Penson, Sep 24 2001
a(1)=1, a(n)=1+sum(i=1, n-1, a(i)*a(n-i)). - Benoit Cloitre, Mar 16 2004
a(n) = Sum_{k=0..n} (-1)^k*3^(n-k)*binomial(n, k)*binomial(k, floor(k/2)) [offset 0]. - Paul Barry, Jan 27 2005
G.f. A(x) satisfies 0=f(x, A(x)) where f(x, y)=x-(1-x)(y-y^2). - Michael Somos, May 23 2005
G.f. A(x) satisfies 0=f(x, A(x), A(A(x))) where f(x, y, z)=x(z-z^2)+(x-1)y^2 . - Michael Somos, May 23 2005
G.f. (for offset 0): (-1+x+(1-6*x+5*x^2)^(1/2))/(2*(-x+x^2)).
G.f. =z*c(z/(1-z))/(1-z) = 1/2 - (1/2)sqrt(1-4z/(1-z)), where c(z)=(1-sqrt(1-4z))/(2z) is the Catalan function (follows from Michael Somos' first comment). - Emeric Deutsch, Aug 12 2007
G.f.: 1/(1-2x-x^2/(1-3x-x^2/(1-3x-x^2/(1-3x-x^2/(1-3x-x^2/(1-.... (continued fraction). - Paul Barry, Apr 19 2009
a(n) = Sum_{k, 0<=k<=n} A091965(n,k)*(-1)^k. - Philippe Deléham, Nov 28 2009
E.g.f.: exp(3x)*(I_0(2x)-I_1(2x)), where I_k(x) is a modified Bessel function of the first kind. - Emanuele Munarini, Apr 15 2011
If we prefix sequence with an additional term a(0)=1, g.f. is (3-3*x-sqrt(1-6*x+5*x^2))/(2*(1-x)). [See Kim, 2011] - N. J. A. Sloane, May 13 2011
From Gary W. Adamson, Jul 21 2011: (Start)
a(n) = upper left term in M^(n-1), M = an infinite square production matrix as follows:
2, 1, 0, 0, 0, 0, ...
1, 2, 1, 0, 0, 0, ...
1, 1, 2, 1, 0, 0, ...
1, 1, 1, 2, 1, 0, ...
1, 1, 1, 1, 2, 1, ...
1, 1, 1, 1, 1, 2, ...
... (End)
G.f. satisfies: A(x) = Sum_{n>=0} x^n * (1 - A(x)^(n+1))/(1 - A(x)); offset=0. - Paul D. Hanna, Nov 07 2011
G.f.: 1/x - 1/x/Q(0), where Q(k)= 1 + (4*k+1)*x/((1-x)*(k+1) - x*(1-x)*(2*k+2)*(4*k+3)/(x*(8*k+6)+(2*k+3)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 14 2013
G.f.: (1-x - (1-5*x)*G(0))/(2*x*(1-x)), where G(k)= 1 + 4*x*(4*k+1)/( (4*k+2)*(1-x) - 2*x*(1-x)*(2*k+1)*(4*k+3)/(x*(4*k+3) + (1-x)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 25 2013
Asymptotics (for offset 0): a(n) ~ 5^(n+3/2)/(8*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jun 28 2013
G.f.: G(0)/(1-x), where G(k) = 1 + (4*k+1)*x/((k+1)*(1-x) - 2*x*(1-x)*(k+1)*(4*k+3)/(2*x*(4*k+3) + (2*k+3)*(1-x)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 29 2014
a(n) = JacobiP(n-1,1,-n-1/2,9)/n. - Peter Luschny, Sep 23 2014
0 = +a(n)*(+25*a(n+1) -50*a(n+2) +15*a(n+3)) +a(n+1)*(-10*a(n+1) +31*a(n+2) -14*a(n+3)) +a(n+2)*(+2*a(n+2) +a(n+3)) for all n in Z. - Michael Somos, Jan 17 2018
a(n+1) = (2/Pi) * Integral_{x = -1..1} (m + 4*x^2)^n*sqrt(1 - x^2) dx at m = 1. In general, the integral, qua sequence in n, gives the m-th binomial transform of the Catalan numbers. - Peter Bala, Jan 26 2020

A035263 Trajectory of 1 under the morphism 0 -> 11, 1 -> 10; parity of 2-adic valuation of 2n: a(n) = A000035(A001511(n)).

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Keywords

Comments

First Feigenbaum symbolic (or period-doubling) sequence, corresponding to the accumulation point of the 2^{k} cycles through successive bifurcations.
To construct the sequence: start with 1 and concatenate: 1,1, then change the last term (1->0; 0->1) gives: 1,0. Concatenate those 2 terms: 1,0,1,0, change the last term: 1,0,1,1. Concatenate those 4 terms: 1,0,1,1,1,0,1,1 change the last term: 1,0,1,1,1,0,1,0, etc. - Benoit Cloitre, Dec 17 2002
Let T denote the present sequence. Here is another way to construct T. Start with the sequence S = 1,0,1,,1,0,1,,1,0,1,,1,0,1,,... and fill in the successive holes with the successive terms of the sequence T (from paper by Allouche et al.). - Emeric Deutsch, Jan 08 2003 [Note that if we fill in the holes with the terms of S itself, we get A141260. - N. J. A. Sloane, Jan 14 2009]
From N. J. A. Sloane, Feb 27 2009: (Start)
In more detail: define S to be 1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1,0,1___...
If we fill the holes with S we get A141260:
1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0,
........1.........0.........1.........1.........0.......1.........1.........0...
- the result is
1..0..1.1.1..0..1.0.1..0..1.1.1..0..1.1.1..0..1.0.1.... = A141260.
But instead, if we define T recursively by filling the holes in S with the terms of T itself, we get A035263:
1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0,
........1.........0.........1.........1.........1.......0.........1.........0...
- the result is
1..0..1.1.1..0..1.0.1..0..1.1.1..0..1.1.1..0..1.1.1.0.1.0.1..0..1.1.1..0..1.0.1.. = A035263. (End)
Characteristic function of A003159, i.e., A035263(n)=1 if n is in A003159 and A035263(n)=0 otherwise (from paper by Allouche et al.). - Emeric Deutsch, Jan 15 2003
This is the sequence of R (=1), L (=0) moves in the Towers of Hanoi puzzle: R, L, R, R, R, L, R, L, R, L, R, R, R, ... - Gary W. Adamson, Sep 21 2003
Manfred Schroeder, p. 279 states, "... the kneading sequences for unimodal maps in the binary notation, 0, 1, 0, 1, 1, 1, 0, 1..., are obtained from the Morse-Thue sequence by taking sums mod 2 of adjacent elements." On p. 278, in the chapter "Self-Similarity in the Logistic Parabola", he writes, "Is there a closer connection between the Morse-Thue sequence and the symbolic dynamics of the superstable orbits? There is indeed. To see this, let us replace R by 1 and C and L by 0." - Gary W. Adamson, Sep 21 2003
Partial sums modulo 2 of the sequence 1, a(1), a(1), a(2), a(2), a(3), a(3), a(4), a(4), a(5), a(5), a(6), a(6), ... . - Philippe Deléham, Jan 02 2004
Parity of A007913, A065882 and A065883. - Philippe Deléham, Mar 28 2004
The length of n-th run of 1's in this sequence is A080426(n). - Philippe Deléham, Apr 19 2004
Also parity of A005043, A005773, A026378, A104455, A117641. - Philippe Deléham, Apr 28 2007
Equals parity of the Towers of Hanoi, or ruler sequence (A001511), where the Towers of Hanoi sequence (1, 2, 1, 3, 1, 2, 1, 4, ...) denotes the disc moved, labeled (1, 2, 3, ...) starting from the top; and the parity of (1, 2, 1, 3, ...) denotes the direction of the move, CW or CCW. The frequency of CW moves converges to 2/3. - Gary W. Adamson, May 11 2007
A conjectured identity relating to the partition sequence, A000041: p(x) = A(x) * A(x^2) when A(x) = the Euler transform of A035263 = polcoeff A174065: (1 + x + x^2 + 2x^3 + 3x^4 + 4x^5 + ...). - Gary W. Adamson, Mar 21 2010
a(n) is 1 if the number of trailing zeros in the binary representation of n is even. - Ralf Stephan, Aug 22 2013
From Gary W. Adamson, Mar 25 2015: (Start)
A conjectured identity relating to the partition sequence, A000041 as polcoeff p(x); A003159, and its characteristic function A035263: (1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); and A036554 indicating n-th terms with zeros in A035263: (2, 6, 8, 10, 14, 18, 22, ...).
The conjecture states that p(x) = A(x) = A(x^2) when A(x) = polcoeffA174065 = the Euler transform of A035263 = 1/(1-x)*(1-x^3)*(1-x^4)*(1-x^5)*... = (1 + x + x^2 + 2x^3 + 3x^4 + 4x^5 + ...) and the aerated variant = the Euler transform of the complement of A035263: 1/(1-x^2)*(1-x^6)*(1-x^8)*... = (1 + x^2 + x^4 + 2x^6 + 3x^8 + 4x^10 + ...).
(End)
The conjecture above was proved by Jean-Paul Allouche on Dec 21 2013.
Regarded as a column vector, this sequence is the product of A047999 (Sierpinski's gasket) regarded as an infinite lower triangular matrix and A036497 (the Fredholm-Rueppel sequence) where the 1's have alternating signs, 1, -1, 0, 1, 0, 0, 0, -1, .... - Gary W. Adamson, Jun 02 2021
The numbers of 1's through n (A050292) can be determined by starting with the binary (say for 19 = 1 0 0 1 1) and writing: next term is twice current term if 0, otherwise twice plus 1. The result is 1, 2, 4, 9, 19. Take the difference row, = 1, 1, 2, 5, 10; and add the odd-indexed terms from the right: 5, 4, 3, 2, 1 = 10 + 2 + 1 = 13. The algorithm is the basis for determining the disc configurations in the tower of Hanoi game, as shown in the Jul 24 2021 comment of A060572. - Gary W. Adamson, Jul 28 2021

References

  • Karamanos, Kostas. "From symbolic dynamics to a digital approach." International Journal of Bifurcation and Chaos 11.06 (2001): 1683-1694. (Full version. See p. 1685)
  • Karamanos, K. (2000). From symbolic dynamics to a digital approach: chaos and transcendence. In Michel Planat (Ed.), Noise, Oscillators and Algebraic Randomness (Lecture Notes in Physics, pp. 357-371). Springer, Berlin, Heidelberg. (Short version. See p. 359)
  • Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W. H. Freeman, 1991
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 892, column 2, Note on p. 84, part (a).

Crossrefs

Parity of A001511. Anti-parity of A007814.
Absolute values of first differences of A010060. Apart from signs, same as A029883. Essentially the same as A056832.
Swapping 0 and 1 gives A096268.
Cf. A033485, A050292 (partial sums), A089608, A088172, A019300, A039982, A073675, A121701, A141260, A000041, A174065, A220466, A154269 (Mobius transform).
Limit of A317957(n) for large n.

Programs

  • Haskell
    import Data.Bits (xor)
    a035263 n = a035263_list !! (n-1)
    a035263_list = zipWith xor a010060_list $ tail a010060_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Maple
    nmax:=105: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := (p+1) mod 2 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 07 2013
    A035263 := n -> 1 - padic[ordp](n, 2) mod 2:
    seq(A035263(n), n=1..105); # Peter Luschny, Oct 02 2018
  • Mathematica
    a[n_] := a[n] = If[ EvenQ[n], 1 - a[n/2], 1]; Table[ a[n], {n, 1, 105}] (* Or *)
    Rest[ CoefficientList[ Series[ Sum[ x^(2^k)/(1 + (-1)^k*x^(2^k)), {k, 0, 20}], {x, 0, 105}], x]]
    f[1] := True; f[x_] := Xor[f[x - 1], f[Floor[x/2]]]; a[x_] := Boole[f[x]] (* Ben Branman, Oct 04 2010 *)
    a[n_] := If[n == 0, 0, 1 - Mod[ IntegerExponent[n, 2], 2]]; (* Jean-François Alcover, Jul 19 2013, after Michael Somos *)
    Nest[ Flatten[# /. {0 -> {1, 1}, 1 -> {1, 0}}] &, {0}, 7] (* Robert G. Wilson v, Jul 23 2014 *)
    SubstitutionSystem[{0->{1,1},1->{1,0}},1,{7}][[1]] (* Harvey P. Dale, Jun 06 2022 *)
  • PARI
    {a(n) = if( n==0, 0, 1 - valuation(n, 2)%2)}; /* Michael Somos, Sep 04 2006 */
    
  • PARI
    {a(n) = if( n==0, 0, n = abs(n); subst( Pol(binary(n)) - Pol(binary(n-1)), x, 1)%2)}; /* Michael Somos, Sep 04 2006 */
    
  • PARI
    {a(n) = if( n==0, 0, n = abs(n); direuler(p=2, n, 1 / (1 - X^((p<3) + 1)))[n])}; /* Michael Somos, Sep 04 2006 */
    
  • Python
    def A035263(n): return (n&-n).bit_length()&1 # Chai Wah Wu, Jan 09 2023
  • Scheme
    (define (A035263 n) (let loop ((n n) (i 1)) (cond ((odd? n) (modulo i 2)) (else (loop (/ n 2) (+ 1 i)))))) ;; (Use mod instead of modulo in R6RS) Antti Karttunen, Sep 11 2017
    

Formula

Absolute values of first differences (A029883) of Thue-Morse sequence (A001285 or A010060). Self-similar under 10->1 and 11->0.
Series expansion: (1/x) * Sum_{i>=0} (-1)^(i+1)*x^(2^i)/(x^(2^i)-1). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 17 2003
a(n) = Sum_{k>=0} (-1)^k*(floor((n+1)/2^k)-floor(n/2^k)). - Benoit Cloitre, Jun 03 2003
Another g.f.: Sum_{k>=0} x^(2^k)/(1+(-1)^k*x^(2^k)). - Ralf Stephan, Jun 13 2003
a(2*n) = 1-a(n), a(2*n+1) = 1. - Ralf Stephan, Jun 13 2003
a(n) = parity of A033485(n). - Philippe Deléham, Aug 13 2003
Equals A088172 mod 2, where A088172 = 1, 2, 3, 7, 13, 26, 53, 106, 211, 422, 845, ... (first differences of A019300). - Gary W. Adamson, Sep 21 2003
a(n) = a(n-1) - (-1)^n*a(floor(n/2)). - Benoit Cloitre, Dec 02 2003
a(1) = 1 and a(n) = abs(a(n-1) - a(floor(n/2))). - Benoit Cloitre, Dec 02 2003
a(n) = 1 - A096268(n+1); A050292 gives partial sums. - Reinhard Zumkeller, Aug 16 2006
Multiplicative with a(2^k) = 1 - (k mod 2), a(p^k) = 1, p > 2. Dirichlet g.f.: Product_{n = 4 or an odd prime} (1/(1-1/n^s)). - Christian G. Bower, May 18 2005
a(-n) = a(n). a(0)=0. - Michael Somos, Sep 04 2006
Dirichlet g.f.: zeta(s)*2^s/(2^s+1). - Ralf Stephan, Jun 17 2007
a(n+1) = a(n) XOR a(ceiling(n/2)), a(1) = 1. - Reinhard Zumkeller, Jun 11 2009
Let D(x) be the generating function, then D(x) + D(x^2) == x/(1-x). - Joerg Arndt, May 11 2010
a(n) = A010060(n) XOR A010060(n+1); a(A079523(n)) = 0; a(A121539(n)) = 1. - Reinhard Zumkeller, Mar 01 2012
a((2*n-1)*2^p) = (p+1) mod 2, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 07 2013
a(n) = A000035(A001511(n)). - Omar E. Pol, Oct 29 2013
a(n) = 2-A056832(n) = (5-A089608(n))/4. - Antti Karttunen, Sep 11 2017, after Benoit Cloitre
For n >= 0, a(n+1) = M(2n) mod 2 where M(n) is the Motzkin number A001006 (see Deutsch and Sagan 2006 link). - David Callan, Oct 02 2018
a(n) = A038712(n) mod 3. - Kevin Ryde, Jul 11 2019
Given any n in the form (k * 2^m, k odd), extract k and m. Categorize the results into two outcomes of (k, m, even or odd). If (k, m) is (odd, even) substitute 1. If (odd, odd), denote the result 0. Example: 5 = (5 * 2^0), (odd, even, = 1). (6 = 3 * 2^1), (odd, odd, = 0). - Gary W. Adamson, Jun 23 2021

Extensions

Alternative description added to the name by Antti Karttunen, Sep 11 2017

A064613 Second binomial transform of the Catalan numbers.

Original entry on oeis.org

1, 3, 10, 37, 150, 654, 3012, 14445, 71398, 361114, 1859628, 9716194, 51373180, 274352316, 1477635912, 8016865533, 43773564294, 240356635170, 1326359740956, 7351846397334, 40913414754324, 228508350629892
Offset: 0

Views

Author

Karol A. Penson, Sep 24 2001

Keywords

Comments

Exponential convolution of Catalan numbers and powers of 2. - Vladeta Jovovic, Dec 03 2004
Hankel transform of this sequence gives A000012 = [1,1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
a(n) is the number of Motzkin paths of length n in which the (1,0)-steps at level 0 come in 3 colors and those at a higher level come in 4 colors. Example: a(3)=37 because, denoting U=(1,1), H=(1,0), and D=(1,-1), we have 3^3 = 27 paths of shape HHH, 3 paths of shape HUD, 3 paths of shape UDH, and 4 paths of shape UHD. - Emeric Deutsch, May 02 2011
a(n) is the number of Schroeder paths of semilength n in which the (2,0)-steps come in 2 colors and having no (2,0)-steps at levels 1,3,5,... - José Luis Ramírez Ramírez, Mar 30 2013
From Tom Copeland, Nov 08 2014: (Start)
This array is one of a family of Catalan arrays related by compositions of the special fractional linear (Möbius) transformations P(x,t)=x/(1-t*x); its inverse Pinv(x,t) = P(x,-t); and an o.g.f. of the Catalan numbers A000108, C(x) = [1-sqrt(1-4x)]/2; and its inverse Cinv(x) = x*(1-x). (Cf A126930.)
O.g.f.: G(x) = C[P[P(x,-1),-1]] = C[P(x,-2)] = (1-sqrt(1-4*x/(1-2*x)))/2 = x*A064613(x).
Ginv(x) = Pinv[Cinv(x),-2] = P[Cinv(x),2] = x(1-x)/[1+2x(1-x)] = (x-x^2)/[1+2(x-x^2)] = x - 3 x^2 + 8 x^3 - ... is -A155020(-x) ignoring first term there. (Cf. A146559, A125145.)(End)

Crossrefs

Programs

  • Magma
    I:=[3,10]; [1] cat [n le 2 select I[n] else ((8*n-2)*Self(n-1)-(12*n-12)*Self(n-2))div (n+1): n in [1..30]]; // Vincenzo Librandi, Jan 23 2017
  • Mathematica
    CoefficientList[Series[(1-Sqrt[(1-6*x)/(1-2*x)])/2/x, {x, 0, 20}], x] (* Vaclav Kotesovec, Jun 29 2013 *)
    a[n_] := 2^n Hypergeometric2F1[1/2, -n, 2, -2];
    Array[a, 22, 0] (* Peter Luschny, Jan 27 2020 *)
  • PARI
    x='x+O('x^66); Vec((1-sqrt((1-6*x)/(1-2*x)))/(2*x)) /* Joerg Arndt, Mar 31 2013 */
    

Formula

a(n) = Sum_{k=0..n} binomial(n, k)*binomial(2*k, k)*2^(n-k)/(k+1).
a(n) = 2^n*hypergeom([1/2, -n], [2], -2).
G.f.: (1-sqrt((1-6*x)/(1-2*x)))/(2*x). - Vladeta Jovovic, May 03 2003
With offset 1: a(1) = 1, a(n) = 2^(n-1) + Sum_{i=1..n-1} a(i)*a(n-i). - Benoit Cloitre, Mar 16 2004
D-finite with recurrence (n+1)*a(n) = (8*n-2)*a(n-1) - (12*n-12)*a(n-2). - Vladeta Jovovic, Jul 16 2004
E.g.f.: exp(4*x)*(BesselI(0, 2*x) - BesselI(1, 2*x)). - Vladeta Jovovic, Dec 03 2004
Inverse binomial transform of A104455. - Philippe Deléham, Nov 30 2007
G.f.: 1/(1-3*x-x^2/(1-4*x-x^2/(1-4*x-x^2/(1-4*x-x^2/(1-... (continued fraction). - Paul Barry, Jul 02 2009
a(n) = Sum_{0<=k<=n} A052179(n,k)*(-1)^k. - Philippe Deléham, Nov 28 2009
From Gary W. Adamson, Jul 21 2011: (Start)
a(n) = the upper left term in M^n, M = an infinite square production matrix as follows:
3, 1, 0, 0, ...
1, 3, 1, 0, ...
1, 1, 3, 1, ...
1, 1, 1, 3, ...
... (End)
a(n) ~ 2^(n-3/2)*3^(n+3/2)/(n^(3/2)*sqrt(Pi)). - Vaclav Kotesovec, Jun 29 2013
G.f. A(x) satisfies: A(x) = 1/(1 - 2*x) + x * A(x)^2. - Ilya Gutkovskiy, Jun 30 2020

Extensions

Name clarified using a comment of Vladeta Jovovic by Peter Bala, Jan 27 2020

A091867 Triangle read by rows: T(n,k) = number of Dyck paths of semilength n having k peaks at odd height.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 3, 4, 6, 0, 1, 6, 15, 10, 10, 0, 1, 15, 36, 45, 20, 15, 0, 1, 36, 105, 126, 105, 35, 21, 0, 1, 91, 288, 420, 336, 210, 56, 28, 0, 1, 232, 819, 1296, 1260, 756, 378, 84, 36, 0, 1, 603, 2320, 4095, 4320, 3150, 1512, 630, 120, 45, 0, 1, 1585, 6633, 12760, 15015, 11880, 6930, 2772, 990, 165, 55, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Mar 10 2004

Keywords

Comments

Number of ordered trees with n edges having k leaves at odd height. Row sums are the Catalan numbers (A000108). T(n,0)=A005043(n). Sum_{k=0..n} k*T(n,k) = binomial(2n-2,n-1).
T(n,k)=number of Dyck paths of semilength n and having k ascents of length 1 (an ascent is a maximal string of consecutive up steps). Example: T(4,2)=6 because we have UdUduud, UduuddUd, uuddUdUd, uudUdUdd, UduudUdd and uudUddUd (the ascents of length 1 are indicated by U instead of u).
T(n,k) is the number of Łukasiewicz paths of length n having k level steps (i.e., (1,0)). A Łukasiewicz path of length n is a path in the first quadrant from (0,0) to (n,0) using rise steps (1,k) for any positive integer k, level steps (1,0) and fall steps (1,-1) (see R. P. Stanley, Enumerative Combinatorics, Vol. 2, Cambridge Univ. Press, Cambridge, 1999, p. 223, Exercise 6.19w; the integers are the slopes of the steps). Example: T(4,1)=4 because we have HU(2)DD, U(2)HDD, U(2)DHD and U(2)DDH, where H=(1,0), U(1,1), U(2)=(1,2) and D=(1,-1). - Emeric Deutsch, Jan 06 2005
T(n,k) = number of noncrossing partitions of [n] containing k singleton blocks. Also, T(n,k) = number of noncrossing partitions of [n] containing k adjacencies. An adjacency is an occurrence of 2 consecutive integers in the same block (here 1 and n are considered consecutive). In fact, the statistics # singletons and # adjacencies have a symmetric joint distribution.
Exponential Riordan array [e^x*(Bessel_I(0,2x)-Bessel_I(1,2x)),x]. - Paul Barry, Mar 03 2011
T(n,k) is the number of ordered trees having n edges and exactly k nodes with one child. - Geoffrey Critzer, Feb 25 2013
From Tom Copeland, Nov 04 2014: (Start)
Summing the coeff. of the partitions in A134264 for a Lagrange inversion formula (see also A249548) containing (h_1)^k = (1')^k gives this triangle, so this array's o.g.f. H(x,t) = x + t * x^2 + (1 + t^2) * x^3 ... is the inverse of the o.g.f. of A104597 with a sign change, i.e., H^(-1)(x,t) = (x-x^2) / [1 + (t-1)(x-x^2)] = Cinv(x)/[1 + (t-1)Cinv(x)] = P[Cinv(x),t-1] where Cinv(x)= x * (1-x) is the inverse of C(x) = [1-sqrt(1-4*x)]/2, an o.g.f. for the Catalan numbers A000108, and P(x,t) = x/(1+t*x) with inverse Pinv(x,t) = -P(-x,t) = x/(1-t*x). Therefore,
O.g.f.: H(x,t) = C[Pinv(x,t-1)] = C[P(x,1-t)] = C[x/(1-(t-1)x)] = {1-sqrt[1-4*x/(1-(t-1)x)]}/2 (for A091867). Reprising,
Inverse O.g.f.: H^(-1)(x,t) = x*(1-x) / [1 + (t-1)x(1-x)] = P[Cinv(x),t-1].
From general arguments in A134264, the row polynomials are an Appell sequence with lowering operator d/dt, having the umbral property (p(.,t)+a)^n=p(n,t+a) with e.g.f. = e^(x*t)/w(x), where 1/w(x)= e.g.f. of first column for the Motzkin numbers in A005043. (Mislabeled argument corrected on Jan 31 2016.)
Cf. A124644 (t-shifted polynomials), A026378 (t=-4), A001700 (t=-3), A005773 (t=-2), A126930 (t=-1) and A210736 (t=-1, a(0)=0, unsigned), A005043 (t=0), A000108 (t=1), A007317 (t=2), A064613 (t=3), A104455 (t=4), A030528 (for inverses).
(End)
The sequence of binomial transforms A126930, A005043, A000108, ... in the above comment appears in A126930 and the link therein to a paper by F. Fite et al. on page 42. - Tom Copeland, Jul 23 2016

Examples

			T(4,2)=6 because we have (ud)uu(ud)dd, uu(ud)dd(ud), uu(ud)(ud)dd, (ud)(ud)uudd, (ud)uudd(ud) and uudd(ud)(ud) (here u=(1,1), d=(1,-1) and the peaks at odd height are shown between parentheses).
Triangle begins:
   1;
   0,   1;
   1,   0,   1;
   1,   3,   0,   1;
   3,   4,   6,   0,  1;
   6,  15,  10,  10,  0,  1;
  15,  36,  45,  20, 15,  0, 1;
  36, 105, 126, 105, 35, 21, 0, 1;
  ...
		

References

  • R. Sedgewick and P. Flajolet, Analysis of Algorithms, Addison and Wesley, 1996, page 254 (first edition)

Crossrefs

Programs

  • Maple
    T := proc(n,k) if k>n then 0 elif k=n then 1 else (binomial(n+1,k)/(n+1))*sum(binomial(n+1-k,j)*binomial(n-k-j-1,j-1),j=1..floor((n-k)/2)) fi end: seq(seq(T(n,k),k=0..n),n=0..12);
    T := (n,k) -> (-1)^(n+k)*binomial(n,k)*hypergeom([-n+k,1/2],[2],4): seq(seq(simplify(T(n, k)), k=0..n), n=0..10); # Peter Luschny, Jul 27 2016
    # alternative Maple program:
    b:= proc(x, y, t) option remember; expand(`if`(x=0, 1,
          `if`(y>0, b(x-1, y-1, 0)*z^irem(t*y, 2), 0)+
          `if`(y (p-> seq(coeff(p, z, i), i=0..n))(b(2*n, 0$2)):
    seq(T(n), n=0..16);  # Alois P. Heinz, May 12 2017
  • Mathematica
    nn=10;cy = ( 1 + x - x y - ( -4x(1+x-x y) + (-1 -x + x y)^2)^(1/2))/(2(1+x-x y)); Drop[CoefficientList[Series[cy,{x,0,nn}],{x,y}],1]//Grid  (* Geoffrey Critzer, Feb 25 2013 *)
    Table[Which[k == n, 1, k > n, 0, True, (Binomial[n + 1, k]/(n + 1)) Sum[Binomial[n + 1 - k, j] Binomial[n - k - j - 1, j - 1], {j, Floor[(n - k)/2]}]], {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 25 2016 *)

Formula

T(n, k) = [binomial(n+1, k)/(n+1)]*Sum_{j=1..floor((n-k)/2)} binomial(n+1-k, j)*binomial(n-k-j-1, j-1) for kn. G.f.=G=G(t, z) satisfies z(1+z-tz)G^2-(1+z-tz)G+1=0. T(n, k)=r(n-k)*binomial(n, k), where r(n)=A005043(n) are the Riordan numbers.
G.f.: 1/(1-xy-x^2/(1-x-xy-x^2/(1-x-xy-x^2/(1-x-xy-x^2/(1-... (continued fraction). - Paul Barry, Aug 03 2009
Sum_{k=0..n} T(n,k)*x^k = A126930(n), A005043(n), A000108(n), A007317(n), A064613(n), A104455(n) for x = -1,0,1,2,3,4 respectively. - Philippe Deléham, Dec 03 2009
Sum_{k=0..n} (-1)^(n-k)*T(n,k)*x^k = A168491(n), A099323(n+1), A001405(n), A005773(n+1), A001700(n), A026378(n+1), A005573(n), A122898(n) for x = -1, 0, 1, 2, 3, 4, 5, 6 respectively. - Philippe Deléham, Dec 03 2009
E.g.f.: e^(x+xy)*(Bessel_I(0,2x)-Bessel_I(1,2x)). - Paul Barry, Mar 10 2010
From Tom Copeland, Nov 06 2014: (Start)
O.g.f.: H(x,t) = {1-sqrt[1-4x/(1-(t-1)x)]}/2 (shifted index, as given in Copeland's comment, see comp. inverse there).
H(x,t)= x / [1-(C.+(t-1))x] = Sum_{n>=1} (C.+ (t-1))^(n-1)*x^n umbrally, e.g., (a.+b.)^2 = a_0*b_2 + 2 a_1*b1_+ a_0*b_2, where (C.)^n = C_n are the Catalan numbers (1,1,2,5,14,..) of A000108.
This shows directly that the lowering operator for the polynomials is D=d/dt, i.e., D p(n,t)= D(C. + (t-1))^n = n * (C. + (t-1))^(n-1) = n*p(n-1,t), so that the polynomials form an Appell sequence, and that p(n,0) gives a Motzkin sum, or Riordan, number A005043.
(End)
T(n,k) = (-1)^(n+k)*binomial(n,k)*hypergeom([k-n,1/2],[2],4). - Peter Luschny, Jul 27 2016

A126331 Triangle T(n,k), 0 <= k <= n, read by rows defined by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = 4*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + 5*T(n-1,k) + T(n-1,k+1) for k >= 1.

Original entry on oeis.org

1, 4, 1, 17, 9, 1, 77, 63, 14, 1, 371, 406, 134, 19, 1, 1890, 2535, 1095, 230, 24, 1, 10095, 15660, 8240, 2269, 351, 29, 1, 56040, 96635, 59129, 19936, 4053, 497, 34, 1, 320795, 598344, 412216, 162862, 40698, 6572, 668, 39, 1
Offset: 0

Views

Author

Philippe Deléham, Mar 10 2007

Keywords

Comments

This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = x*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + y*T(n-1,k) + T(n-1,k+1) for k >= 1. Other triangles arise from choosing different values for (x,y): (0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970; (1,0)-> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877; (1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598; (2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954; (3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791; (4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. - Philippe Deléham, Sep 25 2007
7^n = (n-th row terms) dot (first n+1 odd integers). Example: 7^3 = 343 = (77, 63, 14, 1) dot (1, 3, 5, 7) = (77 + 189 + 70 + 7) = 243. - Gary W. Adamson, Jun 15 2011

Examples

			Triangle begins:
      1;
      4,     1;
     17,     9,    1;
     77,    63,   14,    1;
    371,   406,  134,   19,   1;
   1890,  2535, 1095,  230,  24,  1;
  10095, 15660, 8240, 2269, 351, 29, 1;
From _Philippe Deléham_, Nov 07 2011: (Start)
Production matrix begins:
  4, 1
  1, 5, 1
  0, 1, 5, 1
  0, 0, 1, 5, 1
  0, 0, 0, 1, 5, 1,
  0, 0, 0, 0, 1, 5, 1
  0, 0, 0, 0, 0, 1, 5, 1
  0, 0, 0, 0, 0, 0, 1, 5, 1
  0, 0, 0, 0, 0, 0, 0, 1, 5, 1 (End)
		

Programs

  • Mathematica
    T[0, 0, x_, y_] := 1; T[n_, 0, x_, y_] := x*T[n - 1, 0, x, y] + T[n - 1, 1, x, y]; T[n_, k_, x_, y_] := T[n, k, x, y] = If[k < 0 || k > n, 0,
    T[n - 1, k - 1, x, y] + y*T[n - 1, k, x, y] + T[n - 1, k + 1, x, y]];
    Table[T[n, k, 4, 5], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, May 22 2017 *)

Formula

Sum_{k=0..n} T(n,k) = A098409(n).
Sum_{k>=0} T(m,k)*T(n,k) = T(m+n,0) = A104455(m+n).
Sum_{k=0..n} T(n,k)*(2*k+1) = 7^n. - Philippe Deléham, Mar 26 2007

A125145 a(n) = 3a(n-1) + 3a(n-2). a(0) = 1, a(1) = 4.

Original entry on oeis.org

1, 4, 15, 57, 216, 819, 3105, 11772, 44631, 169209, 641520, 2432187, 9221121, 34959924, 132543135, 502509177, 1905156936, 7222998339, 27384465825, 103822392492, 393620574951, 1492328902329, 5657848431840, 21450532002507
Offset: 0

Views

Author

Tanya Khovanova, Jan 11 2007

Keywords

Comments

Number of aa-avoiding words of length n on the alphabet {a,b,c,d}.
Equals row 3 of the array shown in A180165, the INVERT transform of A028859 and the INVERTi transform of A086347. - Gary W. Adamson, Aug 14 2010
From Tom Copeland, Nov 08 2014: (Start)
This array is one of a family related by compositions of C(x)= [1-sqrt(1-4x)]/2, an o.g.f. for A000108; its inverse Cinv(x) = x(1-x); and the special Mobius transformation P(x,t) = x / (1+t*x) with inverse P(x,-t) in x. Cf. A091867.
O.g.f.: G(x) = P[P[P[-Cinv(-x),-1],-1],-1] = P[-Cinv(-x),-3] = x*(1+x)/[1-3x(1-x)]= x*A125145(x).
Ginv(x) = -C[-P(x,3)] = [-1 + sqrt(1+4x/(1+3x))]/2 = x*A104455(-x).
G(-x) = -x(1-x) * [ 1 - 3*[x*(1+x)] + 3^2*[x*(1+x)]^2 - ...] , and so this array is related to finite differences in the row sums of A030528 * Diag((-3)^1,3^2,(-3)^3,..). (Cf. A146559.)
The inverse of -G(-x) is C[-P(-x,3)]= [1 - sqrt(1-4x/(1-3x))]/2 = x*A104455(x). (End)
Number of 3-compositions of n+1 restricted to parts 1 and 2 (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020

Crossrefs

Cf. A028859 = a(n+2) = 2 a(n+1) + 2 a(n); A086347 = On a 3 X 3 board, number of n-move routes of chess king ending at a given side cell. a(n) = 4a(n-1) + 4a(n-2).
Cf. A128235.
Cf. A180165, A028859, A086347. - Gary W. Adamson, Aug 14 2010

Programs

  • Haskell
    a125145 n = a125145_list !! n
    a125145_list =
       1 : 4 : map (* 3) (zipWith (+) a125145_list (tail a125145_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    I:=[1,4]; [n le 2 select I[n] else 3*Self(n-1)+3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Nov 10 2014
  • Maple
    a[0]:=1: a[1]:=4: for n from 2 to 27 do a[n]:=3*a[n-1]+3*a[n-2] od: seq(a[n],n=0..27); # Emeric Deutsch, Feb 27 2007
    A125145 := proc(n)
        option remember;
        if n <= 1 then
            op(n+1,[1,4]) ;
        else
            3*(procname(n-1)+procname(n-2)) ;
        end if;
    end proc: # R. J. Mathar, Feb 13 2022
  • Mathematica
    nn=23;CoefficientList[Series[(1+x)/(1-3x-3x^2),{x,0,nn}],x] (* Geoffrey Critzer, Feb 09 2014 *)
    LinearRecurrence[{3,3},{1,4},30] (* Harvey P. Dale, May 01 2022 *)

Formula

G.f.: (1+z)/(1-3z-3z^2). - Emeric Deutsch, Feb 27 2007
a(n) = (5*sqrt(21)/42 + 1/2)*(3/2 + sqrt(21)/2)^n + (-5*sqrt(21)/42 + 1/2)*(3/2 - sqrt(21)/2)^n. - Antonio Alberto Olivares, Mar 20 2008
a(n) = A030195(n)+A030195(n+1). - R. J. Mathar, Feb 13 2022
E.g.f.: exp(3*x/2)*(21*cosh(sqrt(21)*x/2) + 5*sqrt(21)*sinh(sqrt(21)*x/2))/21. - Stefano Spezia, Aug 04 2022
a(n) = (((3 + sqrt(21)) / 2)^(n+2) - ((3 - sqrt(21)) / 2)^(n+2)) / (3 * sqrt(21)). - Werner Schulte, Dec 17 2024

A126930 Inverse binomial transform of A005043.

Original entry on oeis.org

1, -1, 2, -3, 6, -10, 20, -35, 70, -126, 252, -462, 924, -1716, 3432, -6435, 12870, -24310, 48620, -92378, 184756, -352716, 705432, -1352078, 2704156, -5200300, 10400600, -20058300, 40116600, -77558760, 155117520, -300540195, 601080390, -1166803110
Offset: 0

Views

Author

Philippe Deléham, Mar 17 2007

Keywords

Comments

Successive binomial transforms are A005043, A000108, A007317, A064613, A104455. Hankel transform is A000012.
Moment sequence of the trace of the square of a random matrix in USp(2)=SU(2). If X=tr(A^2) is a random variable (a distributed with Haar measure) then a(n) = E[X^n]. - Andrew V. Sutherland, Feb 29 2008
From Tom Copeland, Nov 08 2014: (Start)
This array is one of a family of Catalan arrays related by compositions of the special fractional linear (Mobius) transformation P(x,t) = x/(1-t*x); its inverse Pinv(x,t) = P(x,-t); an o.g.f. of the Catalan numbers A000108, C(x) = [1-sqrt(1-4x)]/2; and its inverse Cinv(x) = x*(1-x). The Motzkin sums, or Riordan numbers, A005043 are generated by Mot(x)=C[P(x,1)]. One could, of course, choose the Riordan numbers as the parent sequence.
O.g.f.: G(x) = C[P[P(x,1),1]1] = C[P(x,2)] = (1-sqrt(1-4*x/(1+2*x)))/2 = x - x^2 + 2 x^3 - ... = Mot[P(x,1)].
Ginv(x) = Pinv[Cinv(x),2] = P[Cinv(x),-2] = x(1-x)/[1-2x(1-x)] = (x-x^2)/[1-2(x-x^2)] = x*A146559(x).
Cf. A091867 and A210736 for an unsigned version with a leading 1. (End)

Crossrefs

Programs

  • Maple
    egf := BesselI(0,2*x) - BesselI(1,2*x):
    seq(n!*coeff(series(egf,x,34),x,n),n=0..33); # Peter Luschny, Dec 17 2014
  • Mathematica
    CoefficientList[Series[(1 + 2 x - Sqrt[1 - 4 x^2])/(2 x (1 + 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 23 2013 *)
    Table[2^n Hypergeometric2F1[3/2, -n, 2, 2], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 02 2015 *)
  • PARI
    x='x+O('x^50); Vec((1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x))) \\ Altug Alkan, Nov 03 2015

Formula

a(n) = (-1)^n*C(n, floor(n/2)) = (-1)^n*A001405(n).
a(2*n) = A000984(n), a(2*n+1) = -A001700(n).
a(n) = (1/Pi)*Integral_{t=0..Pi}(2cos(2t))^n*2sin^2(t) dt. - Andrew V. Sutherland, Feb 29 2008, Mar 09 2008
a(n) = (-2)^n + Sum_{k=0..n-1} a(k)*a(n-1-k), a(0)=1. - Philippe Deléham, Dec 12 2009
G.f.: (1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x)). - Philippe Deléham, Mar 01 2013
O.g.f.: (1 + x*c(x^2))/(1 + 2*x), with the o.g.f. c(x) for the Catalan numbers A000108. From the o.g.f. of the Riordan type Catalan triangle A053121. This is the rewritten g.f. given in the previous formula. This is G(-x) with the o.g.f. G(x) of A001405. - Wolfdieter Lang, Sep 22 2013
D-finite with recurrence (n+1)*a(n) +2*a(n-1) +4*(-n+1)*a(n-2)=0. - R. J. Mathar, Dec 04 2013
Recurrence (an alternative): (n+1)*a(n) = 8*(n-2)*a(n-3) + 4*(n-2)*a(n-2) + 2*(-n-1)*a(n-1), n>=3. - Fung Lam, Mar 22 2014
Asymptotics: a(n) ~ (-1)^n*2^(n+1/2)/sqrt(n*Pi). - Fung Lam, Mar 22 2014
E.g.f.: BesselI(0,2*x) - BesselI(1,2*x). - Peter Luschny, Dec 17 2014
a(n) = 2^n*hypergeom([3/2,-n], [2], 2). - Vladimir Reshetnikov, Nov 02 2015
G.f. A(x) satisfies: A(x) = 1/(1 + 2*x) + x*A(x)^2. - Ilya Gutkovskiy, Jul 10 2020

A098474 Triangle read by rows, T(n,k) = C(n,k)*C(2*k,k)/(k+1), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 5, 1, 4, 12, 20, 14, 1, 5, 20, 50, 70, 42, 1, 6, 30, 100, 210, 252, 132, 1, 7, 42, 175, 490, 882, 924, 429, 1, 8, 56, 280, 980, 2352, 3696, 3432, 1430, 1, 9, 72, 420, 1764, 5292, 11088, 15444, 12870, 4862, 1, 10, 90, 600, 2940, 10584, 27720
Offset: 0

Views

Author

Paul Barry, Sep 09 2004

Keywords

Comments

A Catalan scaled binomial matrix.
From Philippe Deléham, Sep 01 2005: (Start)
Table U(n,k), k >= 0, n >= 0, read by antidiagonals, begins:
row k = 0: 1, 1, 2, 5, 14, ... is A000108
row k = 1: 1, 2, 6, 20, 70, ... is A000984
row k = 2: 1, 3, 12, 50, 280, ... is A007854
row k = 3: 1, 4, 20, 104, 548, ... is A076035
row k = 4: 1, 5, 30, 185, 1150, ... is A076036
G.f. for row k: 1/(1-(k+1)*x*C(x)) where C(x) is the g.f. = for Catalan numbers A000108.
U(n,k) = Sum_{j=0..n} A106566(n,j)*(k+1)^j. (End)
This sequence gives the coefficients (increasing powers of x) of the Jensen polynomials for the Catalan sequence A000108 of degree n and shift 0. For the definition of Jensen polynomials for a sequence see a comment in A094436. - Wolfdieter Lang, Jun 25 2019

Examples

			Rows begin:
  1;
  1, 1;
  1, 2,  2;
  1, 3,  6,   5;
  1, 4, 12,  20,  14;
  1, 5, 20,  50,  70,  42;
  1, 6, 30, 100, 210, 252, 132;
  ...
Row 3: t*(1 - 3*t + 6*t^2 - 5*t^3)/(1 - 4*t)^(9/2) = 1/2*Sum_{k >= 1} k*(k+1)*(k+2)*(k+3)/4!*binomial(2*k,k)*t^k. - _Peter Bala_, Jun 13 2016
		

Crossrefs

Row sums are A007317.
Antidiagonal sums are A090344.
Principal diagonal is A000108.
Mirror image of A124644.

Programs

  • Maple
    p := proc(n) option remember; if n = 0 then 1 else normal((x*(1 + 4*x)*diff(p(n-1, x), x) + (2*x + n + 1)*p(n-1, x))/(n + 1)) fi end:
    row := n -> local k; seq(coeff(p(n), x, k), k = 0..n):
    for n from 0 to 6 do row(n) od;  # Peter Luschny, Jun 21 2023
  • Mathematica
    Table[Binomial[n, k] Binomial[2 k, k]/(k + 1), {n, 0, 10}, {k, 0, n}] // Flatten (* or *)
    Table[(-1)^k*CatalanNumber[k] Pochhammer[-n, k]/k!, {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Feb 17 2017 *)
  • Python
    from functools import cache
    @cache
    def A098474row(n: int) -> list[int]:
        if n == 0: return [1]
        a = A098474row(n - 1) + [0]
        row = [0] * (n + 1)
        row[0] = 1; row[1] = n
        for k in range(2, n + 1):
            row[k] = (a[k] * (n + k + 1) + a[k - 1] * (4 * k - 2)) // (n + 1)
        return row  # Peter Luschny, Jun 22 2023
  • Sage
    def A098474(n,k):
        return (-1)^k*catalan_number(k)*rising_factorial(-n,k)/factorial(k)
    for n in range(7): [A098474(n,k) for k in (0..n)] # Peter Luschny, Feb 05 2015
    

Formula

G.f.: 2/(1-x+(1-x-4*x*y)^(1/2)). - Vladeta Jovovic, Sep 11 2004
E.g.f.: exp(x*(1+2*y))*(BesselI(0, 2*x*y)-BesselI(1, 2*x*y)). - Vladeta Jovovic, Sep 11 2004
G.f.: 1/(1-x-xy/(1-xy/(1-x-xy/(1-xy/(1-x-xy/(1-xy/(1-x-xy/(1-xy/(1-... (continued fraction). - Paul Barry, Feb 11 2009
Sum_{k=0..n} T(n,k)*x^(n-k) = A126930(n), A005043(n), A000108(n), A007317(n+1), A064613(n), A104455(n) for x = -2, -1, 0, 1, 2, 3 respectively. - Philippe Deléham, Dec 12 2009
T(n,k) = (-1)^k*Catalan(k)*Pochhammer(-n,k)/k!. - Peter Luschny, Feb 05 2015
O.g.f.: [1 - sqrt(1-4tx/(1-x))]/(2tx) = 1 + (1+t) x + (1+2t+2t^2) x^2 + (1+3t+6t^2+5t^3) x^3 + ... , generating the polynomials of this entry, reverse of A124644. See A011973 for a derivation and the inverse o.g.f., connected to the Fibonacci, Chebyshev, and Motzkin polynomials. See also A267633. - Tom Copeland, Jan 25 2016
From Peter Bala, Jun 13 2016: (Start)
The o.g.f. F(x,t) = ( 1 - sqrt(1 - 4*t*x/(1 - x)) )/(2*t*x) satisfies the partial differential equation d/dx(x*(1 - x)*F) - x*t*(1 + 4*t)*dF/dt - 2*x*t*F = 1. This gives a recurrence for the row polynomials: (n + 2)*R(n+1,t) = t*(1 + 4*t)*R'(n,t) + (2*t + n + 2)*R(n,t), where the prime ' indicates differentiation with respect to t.
Equivalently, setting Q(n,t) = t^(n+2)*R(n,-t)/(1 - 4*t)^(n + 3/2) we have t^2*d/dt(Q(n,t)) = (n + 2)*Q(n+1,t).
This leads to the following expansions:
Q(0,t) = (1/2)*Sum_{k >= 1} k*binomial(2*k,k)*t^(k+1)
Q(1,t) = (1/2)*Sum_{k >= 1} k*(k+1)/2!*binomial(2*k,k)*t^(k+2)
Q(2,t) = (1/2)*Sum_{k >= 1} k*(k+1)*(k+2)/3!*binomial(2*k,k) *t^(k+3) and so on. (End)
Sum_{k=0..n} T(n,k)*x^k = A007317(n+1), A162326(n+1), A337167(n) for x = 1, 2, 3 respectively. - Sergii Voloshyn, Mar 31 2022

Extensions

New name using a formula of Paul Barry by Peter Luschny, Feb 05 2015

A124644 Triangle read by rows. T(n, k) = binomial(n, k) * CatalanNumber(n - k).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 6, 3, 1, 14, 20, 12, 4, 1, 42, 70, 50, 20, 5, 1, 132, 252, 210, 100, 30, 6, 1, 429, 924, 882, 490, 175, 42, 7, 1, 1430, 3432, 3696, 2352, 980, 280, 56, 8, 1, 4862, 12870, 15444, 11088, 5292, 1764, 420, 72, 9, 1, 16796, 48620, 64350, 51480, 27720
Offset: 0

Views

Author

Farkas Janos Smile (smile_farkasjanos(AT)yahoo.com.au), Dec 21 2006

Keywords

Comments

Equal to A091867*A007318. - Philippe Deléham, Dec 12 2009
Exponential Riordan array [exp(2x)*(Bessel_I(0,2x)-Bessel_I(1,2x)),x]. - Paul Barry, Mar 03 2011
From Tom Copeland, Nov 04 2014: (Start)
O.g.f: G(x,t) = C[Pinv(x,t)] = {1 - sqrt[1 - 4 *x /(1-x*t)]}/2 where C(x) = [1 - sqrt(1-4x)]/2, an o.g.f. for the shifted Catalan numbers A000108 with inverse Cinv(x) = x*(1-x), and Pinv(x,t)= -P(-x,t) = x/(1-t*x) with inverse P(x,t) = 1/(1+t*x). This puts this array in a family of arrays formed from the composition of C and P and their inverses. -G(-x,t) is the comp. inverse of the o.g.f. of A030528.
This is an Appell sequence with lowering operator d/dt p(n,t) = n*p(n-1,t) and (p(.,t)+a)^n = p(n,t+a). The e.g.f. has the form e^(x*t)/w(t) where 1/w(t) is the e.g.f. of the first column, which is the Catalan sequence A000108. (End)

Examples

			From _Paul Barry_, Jan 28 2009: (Start)
Triangle begins
   1,
   1,  1,
   2,  2,  1,
   5,  6,  3,  1,
  14, 20, 12,  4,  1,
  42, 70, 50, 20,  5,  1 (End)
		

Crossrefs

Cf. A098474 (mirror image), A000108, A091867, A030528, A104597.
Row sums give A007317(n+1).

Programs

  • Maple
    m:=n->binomial(2*n, n)/(n+1): T:=proc(n, k) if k<=n then binomial(n, k)*m(n-k) else 0 fi end: for n from 0 to 10 do seq(T(n, k), k=0..n) od;
  • Mathematica
    Table[Binomial[n, #] Binomial[2 #, #]/(# + 1) &[n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* or *)
    Table[Abs[(-1)^k*CatalanNumber[#] Pochhammer[-n, #]/#!] &[n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Feb 17 2017 *)
  • Sage
    def A124644(n,k):
        return (-1)^(n-k)*catalan_number(n-k)*rising_factorial(-n,n-k)/factorial(n-k)
    for n in range(7): [A124644(n,k) for k in (0..n)] # Peter Luschny, Feb 05 2015

Formula

T(n,k) = [x^(n-k)]F(-n,n-k+1;1;-1-x). - Paul Barry, Sep 05 2008
G.f.: 1/(1-xy-x/(1-x/(1-xy-x/(1-x/(1-xy-x/(1-x.... (continued fraction). - Paul Barry, Jan 06 2009
G.f.: 1/(1-x-xy-x^2/(1-2x-xy-x^2/(1-2x-xy-x^2/(1-.... (continued fraction). - Paul Barry, Jan 28 2009
T(n,k) = Sum_{i = 0..n} C(n,i)*(-1)^(n-i)*Sum{j = 0..i} C(j,k)*C(i,j)*A000108(i-j). - Paul Barry, Aug 03 2009
Sum_{k = 0..n} T(n,k)*x^k = A126930(n), A005043(n), A000108(n), A007317(n+1), A064613(n), A104455(n) for x = -2, -1, 0, 1, 2, 3 respectively. T(n,k)= A007318(n,k)*A000108(n-k). - Philippe Deléham, Dec 12 2009
E.g.f.: exp(2*x + x*y)*(Bessel_I(0,2*x) - Bessel_I(1,2*x)). - Paul Barry, Mar 10 2010
From Tom Copeland, Nov 08 2014: (Start)
O.g.f.: G(x,t) = C[P(x,t)] = [1 - sqrt(1-4*x / (1-t*x))] / 2 = Sum_{n >= 1} (C. + t)^(n-1) * x^n] = x + (1 + t) x^2 + (2 + 2t + t^2) x^3 + ... umbrally, where (C.)^n = C_n = (1,1,2,5,8,...) = A000108(x), C(x)= x*A000108(x)= G(x,0), and P(x,t) = x/(1 + t*x), a special linear fractional (Mobius) transformation. P(x,-t)= -P(-x,t) is the inverse of P(x,t).
Inverse o.g.f.: Ginv(x,t) = P[Cinv(x),-t] = x*(1-x) / [1 - t*x(1-x)] = -A030528(-x,t), where Cinv(x) = x*(1-x) is the inverse of C(x).
G(x,t) = x*A091867(x,t+1), and Ginv(x,t) = x*A104597(x,-(t+1)). (End)
T(n, k) = (-1)^(n-k)*Catalan(n-k)*Pochhammer(-n,n-k)/(n-k)!. - Peter Luschny, Feb 05 2015
Recurrence: T(n, 0) = Catalan(n) = 1/(n+1)*binomial(2*n, n) and, for 1 <= k <= n, T(n, k) = (n/k) * T(n-1, k-1). - Peter Bala, Feb 04 2024

Extensions

Name brought in line with the Maple program by Peter Luschny, Jun 21 2023
Showing 1-10 of 16 results. Next