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 14 results. Next

A001353 a(n) = 4*a(n-1) - a(n-2) with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 4, 15, 56, 209, 780, 2911, 10864, 40545, 151316, 564719, 2107560, 7865521, 29354524, 109552575, 408855776, 1525870529, 5694626340, 21252634831, 79315912984, 296011017105, 1104728155436, 4122901604639, 15386878263120, 57424611447841, 214311567528244
Offset: 0

Views

Author

Keywords

Comments

3*a(n)^2 + 1 is a square. Moreover, 3*a(n)^2 + 1 = (2*a(n) - a(n-1))^2.
Consecutive terms give nonnegative solutions to x^2 - 4*x*y + y^2 = 1. - Max Alekseyev, Dec 12 2012
Values y solving the Pellian x^2 - 3*y^2 = 1; corresponding x values given by A001075(n). Moreover, we have a(n) = 2*a(n-1) + A001075(n-1). - Lekraj Beedassy, Jul 13 2006
Number of spanning trees in 2 X n grid: by examining what happens at the right-hand end we see that a(n) = 3*a(n-1) + 2*a(n-2) + 2*a(n-3) + ... + 2*a(1) + 1, where the final 1 corresponds to the tree ==...=| !. Solving this we get a(n) = 4*a(n-1) - a(n-2).
Complexity of 2 X n grid.
A016064 also describes triangles whose sides are consecutive integers and in which an inscribed circle has an integer radius. A001353 is exactly and precisely mapped to the integer radii of such inscribed circles, i.e., for each term of A016064, the corresponding term of A001353 gives the radius of the inscribed circle. - Harvey P. Dale, Dec 28 2000
n such that 3*n^2 = floor(sqrt(3)*n*ceiling(sqrt(3)*n)). - Benoit Cloitre, May 10 2003
For n>0, ratios a(n+1)/a(n) may be obtained as convergents of the continued fraction expansion of 2+sqrt(3): either as successive convergents of [4;-4] or as odd convergents of [3;1, 2]. - Lekraj Beedassy, Sep 19 2003
Ways of packing a 3 X (2*n-1) rectangle with dominoes, after attaching an extra square to the end of one of the sides of length 3. With reference to A001835, therefore: a(n) = a(n-1) + A001835(n-1) and A001835(n) = 3*A001835(n-1) + 2*a(n-1). - Joshua Zucker and the Castilleja School Math Club, Oct 28 2003
a(n+1) is a Chebyshev transform of 4^n, where the sequence with g.f. G(x) is sent to the sequence with g.f. (1/(1+x^2))G(x/(1+x^2)). - Paul Barry, Oct 25 2004
This sequence is prime-free, because a(2n) = a(n) * (a(n+1)-a(n-1)) and a(2n+1) = a(n+1)^2 - a(n)^2 = (a(n+1)+a(n)) * (a(n+1)-a(n)). - Jianing Song, Jul 06 2019
Numbers such that there is an m with t(n+m) = 3*t(m), where t(n) are the triangular numbers A000217. For instance, t(35) = 3*t(20) = 630, so 35 - 20 = 15 is in the sequence. - Floor van Lamoen, Oct 13 2005
a(n) = number of distinct matrix products in (A + B + C + D)^n where commutator [A,B] = 0 but neither A nor B commutes with C or D. - Paul D. Hanna and Max Alekseyev, Feb 01 2006
For n > 1, middle side (or long leg) of primitive Pythagorean triangles having an angle nearing Pi/3 with larger values of sides. [Complete triple (X, Y, Z), X < Y < Z, is given by X = A120892(n), Y = a(n), Z = A120893(n), with recurrence relations X(i+1) = 2*{X(i) - (-1)^i} + a(i); Z(i+1) = 2*{Z(i) + a(i)} - (-1)^i.] - Lekraj Beedassy, Jul 13 2006
From Dennis P. Walsh, Oct 04 2006: (Start)
Number of 2 X n simple rectangular mazes. A simple rectangular m X n maze is a graph G with vertex set {0, 1, ..., m} X {0, 1, ..., n} that satisfies the following two properties: (i) G consists of two orthogonal trees; (ii) one tree has a path that sequentially connects (0,0),(0,1), ..., (0,n), (1,n), ...,(m-1,n) and the other tree has a path that sequentially connects (1,0), (2,0), ..., (m,0), (m,1), ..., (m,n). For example, a(2) = 4 because there are four 2 X 2 simple rectangular mazes:
| | | | | | | | |
| | | | | || | |
(End)
[1, 4, 15, 56, 209, ...] is the Hankel transform of [1, 1, 5, 26, 139, 758, ...](see A005573). - Philippe Deléham, Apr 14 2007
The upper principal convergents to 3^(1/2), beginning with 2/1, 7/4, 26/15, 97/56, comprise a strictly decreasing sequence; numerators=A001075, denominators=A001353. - Clark Kimberling, Aug 27 2008
From Gary W. Adamson, Jun 21 2009: (Start)
A001353 and A001835 = bisection of continued fraction [1, 2, 1, 2, 1, 2, ...], i.e., of [1, 3, 4, 11, 15, 41, ...].
For n>0, a(n) equals the determinant of an (n-1) X (n-1) tridiagonal matrix with ones in the super and subdiagonals and (4, 4, 4, ...) as the main diagonal. [Corrected by Johannes Boot, Sep 04 2011]
A001835 and A001353 = right and next to right borders of triangle A125077. (End)
a(n) is equal to the permanent of the (n-1) X (n-1) Hessenberg matrix with 4's along the main diagonal, i's along the superdiagonal and the subdiagonal (i is the imaginary unit), and 0's everywhere else. - John M. Campbell, Jun 09 2011
2a(n) is the number of n-color compositions of 2n consisting of only even parts; see Guo in references. - Brian Hopkins, Jul 19 2011
Pisano period lengths: 1, 2, 6, 4, 3, 6, 8, 4, 18, 6, 10, 12, 12, 8, 6, 8, 18, 18, 5, 12, ... - R. J. Mathar, Aug 10 2012
From Michel Lagneau, Jul 08 2014: (Start)
a(n) is defined also by the recurrence a(1)=1; for n>1, a(n+1) = 2*a(n) + sqrt(3*a(n)^2 + 1) where a(n) is an integer for every n. This sequence is generalizable by the sequence b(n,m) of parameter m with the initial condition b(1,m) = 1, and for n > 1 b(n+1,m) = m*b(n,m) + sqrt((m^2 - 1)*b(n,m)^2 + 1) for m = 2, 3, 4, ... where b(n,m) is an integer for every n.
The first corresponding sequences are
b(n,2) = a(n) = A001353(n);
b(n,3) = A001109(n);
b(n,4) = A001090(n);
b(n,5) = A004189(n);
b(n,6) = A004191(n);
b(n,7) = A007655(n);
b(n,8) = A077412(n);
b(n,9) = A049660(n);
b(n,10) = A075843(n);
b(n,11) = A077421(n);
....................
We obtain a general sequence of polynomials {b(n,x)} = {1, 2*x, 4*x^2 - 1, 8*x^3 - 4*x, 16*x^4 - 12*x^2 + 1, 32*x^5 - 32*x^3 + 6*x, ...} with x = m where each b(n,x) is a Gegenbauer polynomial defined by the recurrence b(n,x)- 2*x*b(n-1,x) + b(n-2,x) = 0, the same relation as the Chebyshev recurrence, but with the initial conditions b(x,0) = 1 and b(x,1) = 2*x instead b(x,0) = 1 and b(x,1) = x for the Chebyshev polynomials. (End)
If a(n) denotes the n-th term of the above sequence and we construct a triangle whose sides are a(n) - 1, a(n) + 1 and sqrt(3a(n)^2 + 1), then, for every n the measure of one of the angles of the triangle so constructed will always be 120 degrees. This result of ours was published in Mathematics Spectrum (2012/2013), Vol. 45, No. 3, pp. 126-128. - K. S. Bhanu and Dr. M. N. Deshpande, Professor (Retd), Department of Statistics, Institute of Science, Nagpur (India).
For n >= 1, a(n) equals the number of 01-avoiding words of length n - 1 on alphabet {0, 1, 2, 3}. - Milan Janjic, Jan 25 2015
For n > 0, 10*a(n) is the number of vertices and roots on level n of the {4, 5} mosaic (see L. Németh Table 1 p. 6). - Michel Marcus, Oct 30 2015
(2 + sqrt(3))^n = A001075(n) + a(n)*sqrt(3), n >= 0; integers in the quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 16 2018
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for all positive integers n and m. - Michael Somos, Dec 12 2019
The Cholesky decomposition A = C C* for tridiagonal A with A[i,i] = 4 and A[i+1,i] = A[i,i+1] = -1, as it arises in the discretized 2D Laplace operator (Poisson equation...), has nonzero elements C[i,i] = sqrt(a(i+1)/a(i)) = -1/C[i+1,i], i = 1, 2, 3, ... - M. F. Hasler, Mar 12 2021
The triples (a(n-1), 2a(n), a(n+1)), n=2,3,..., are exactly the triples (a,b,c) of positive integers a < b < c in arithmetic progression such that a*b+1, b*c+1, and c*a+1 are perfect squares. - Bernd Mulansky, Jul 10 2021
From Greg Dresden and Linyun Sheng, Jul 01 2025: (Start)
a(n) is the number of ways to tile this strip of length n,
| | | | | | |\
||__||__||__|_\,
where the last cell is a right triangle, with three types of tiles: 1 X 1 squares, 1 X 1 small right triangles, and large right triangles (with large side length 2) formed by joining two of those small right triangles along a short leg. As an example, here is one of the a(7)=2911 ways to tile the 1 X 7 strip with these kinds of tiles:
|\ /|\ | /| | / \
|\/_|\|/|__|/_\,
(End)

Examples

			For example, when n = 3:
  ****
  .***
  .***
can be packed with dominoes in 4 different ways: 3 in which the top row is tiled with two horizontal dominoes and 1 in which the top row has two vertical and one horizontal domino, as shown below, so a(2) = 4.
  ---- ---- ---- ||--
  .||| .--| .|-- .|||
  .||| .--| .|-- .|||
G.f. = x + 4*x^2 + 15*x^3 + 56*x^4 + 209*x^5 + 780*x^6 + 2911*x^7 + 10864*x^8 + ...
		

References

  • Bastida, Julio R., Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163-166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009)
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; p. 163.
  • F. Faase, On the number of specific spanning subgraphs of the graphs G X P_n, Ars Combin. 49 (1998), 129-154.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 329.
  • J. D. E. Konhauser et al., Which Way Did the Bicycle Go?, MAA 1996, p. 104.
  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A bisection of A002530.
Cf. A125077.
A row of A116469.
Chebyshev sequence U(n, m): A000027 (m=1), this sequence (m=2), A001109 (m=3), A001090 (m=4), A004189 (m=5), A004191 (m=6), A007655 (m=7), A077412 (m=8), A049660 (m=9), A075843 (m=10), A077421 (m=11), A077423 (m=12), A097309 (m=13), A097311 (m=14), A097313 (m=15), A029548 (m=16), A029547 (m=17), A144128 (m=18), A078987 (m=19), A097316 (m=33).
Cf. A323182.

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=4*a[n-1]-a[n-2]; od; a; # Muniru A Asiru, Feb 16 2018
    
  • Haskell
    a001353 n = a001353_list !! n
    a001353_list =
       0 : 1 : zipWith (-) (map (4 *) $ tail a001353_list) a001353_list
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    I:=[0,1]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..30]]; // G. C. Greubel, Jun 06 2019
    
  • Maple
    A001353 := proc(n) option remember; if n <= 1 then n else 4*A001353(n-1)-A001353(n-2); fi; end;
    A001353:=z/(1-4*z+z**2); # Simon Plouffe in his 1992 dissertation.
    seq( simplify(ChebyshevU(n-1, 2)), n=0..20); # G. C. Greubel, Dec 23 2019
  • Mathematica
    a[n_] := (MatrixPower[{{1, 2}, {1, 3}}, n].{{1}, {1}})[[2, 1]]; Table[ a[n], {n, 0, 30}] (* Robert G. Wilson v, Jan 13 2005 *)
    Table[GegenbauerC[n-1, 1, 2], {n, 0, 30}] (* Zerinvary Lajos, Jul 14 2009 *)
    Table[-((I Sin[n ArcCos[2]])/Sqrt[3]), {n, 0, 30}] // FunctionExpand (* Eric W. Weisstein, Jul 16 2011 *)
    Table[Sinh[n ArcCosh[2]]/Sqrt[3], {n, 0, 30}] // FunctionExpand (* Eric W. Weisstein, Jul 16 2011 *)
    Table[ChebyshevU[n-1, 2], {n, 0, 30}] (* Eric W. Weisstein, Jul 16 2011 *)
    a[0]:=0; a[1]:=1; a[n_]:= a[n]= 4a[n-1] - a[n-2]; Table[a[n], {n, 0, 30}] (* Alonso del Arte, Jul 19 2011 *)
    LinearRecurrence[{4, -1}, {0, 1}, 30] (* Sture Sjöstedt, Dec 06 2011 *)
    Round@Table[Fibonacci[2n, Sqrt[2]]/Sqrt[2], {n, 0, 30}] (* Vladimir Reshetnikov, Sep 15 2016 *)
  • PARI
    M = [ 1, 1, 0; 1, 3, 1; 0, 1, 1]; for(i=0,30,print1(([1,0,0]*M^i)[2],",")) \\ Lambert Klasen (Lambert.Klasen(AT)gmx.net), Jan 25 2005
    
  • PARI
    {a(n) = real( (2 + quadgen(12))^n / quadgen(12) )}; /* Michael Somos, Sep 19 2008 */
    
  • PARI
    {a(n) = polchebyshev(n-1, 2, 2)}; /* Michael Somos, Sep 19 2008 */
    
  • PARI
    concat(0, Vec(x/(1-4*x+x^2) + O(x^30))) \\ Altug Alkan, Oct 30 2015
    
  • Python
    a001353 = [0, 1]
    for n in range(30): a001353.append(4*a001353[-1] - a001353[-2])
    print(a001353)  # Gennady Eremin, Feb 05 2022
  • Sage
    [lucas_number1(n,4,1) for n in range(30)] # Zerinvary Lajos, Apr 22 2009
    
  • Sage
    [chebyshev_U(n-1,2) for n in (0..20)] # G. C. Greubel, Dec 23 2019
    

Formula

G.f.: x/(1-4*x+x^2).
a(n) = ((2 + sqrt(3))^n - (2 - sqrt(3))^n)/(2*sqrt(3)).
a(n) = sqrt((A001075(n)^2 - 1)/3).
a(n) = 2*a(n-1) + sqrt(3*a(n-1)^2 + 1). - Lekraj Beedassy, Feb 18 2002
Limit_{n->oo} a(n)/a(n-1) = 2 + sqrt(3). - Gregory V. Richardson, Oct 06 2002
Binomial transform of A002605.
E.g.f.: exp(2*x)*sinh(sqrt(3)*x)/sqrt(3).
a(n) = S(n-1, 4) = U(n-1, 2); S(-1, x) := 0, Chebyshev's polynomials of the second kind A049310.
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)(-1)^k*4^(n - 2*k). - Paul Barry, Oct 25 2004
a(n) = Sum_{k=0..n-1} binomial(n+k,2*k+1)*2^k. - Paul Barry, Nov 30 2004
a(n) = 3*a(n-1) + 3*a(n-2) - a(n-3), n>=3. - Lekraj Beedassy, Jul 13 2006
a(n) = -A106707(n). - R. J. Mathar, Jul 07 2006
M^n * [1,0] = [A001075(n), A001353(n)], where M = the 2 X 2 matrix [2,3; 1,2]; e.g., a(4) = 56 since M^4 * [1,0] = [97, 56] = [A001075(4), A001353(4)]. - Gary W. Adamson, Dec 27 2006
From Michael Somos, Sep 19 2008: (Start)
Sequence satisfies 1 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v.
a(n) = -a(-n) for all integer n. (End)
Rational recurrence: a(n) = (17*a(n-1)*a(n-2) - 4*(a(n-1)^2 + a(n-2)^2))/a(n-3) for n > 3. - Jaume Oliver Lafont, Dec 05 2009
If p[i] = Fibonacci(2i) and if A is the Hessenberg matrix of order n defined by A[i,j] = p[j-i+1], (i <= j), A[i,j] = -1, (i = j + 1), and A[i,j] = 0 otherwise, then, for n >= 1, a(n) = det A. - Milan Janjic, May 08 2010
From Eric W. Weisstein, Jul 16 2011: (Start)
a(n) = C_{n-1}^{(1)}(2), where C_n^{(m)}(x) is the Gegenbauer polynomial.
a(n) = -i*sin(n*arccos(2))/sqrt(3).
a(n) = sinh(n*arccosh(2))/sqrt(3). (End)
a(n) = b such that Integral_{x=0..Pi/2} (sin(n*x))/(2-cos(x)) dx = c + b*log(2). - Francesco Daddi, Aug 02 2011
a(n) = sqrt(A098301(n)) = sqrt([A055793 / 3]), base 3 analog of A031150. - M. F. Hasler, Jan 16 2012
a(n+1) = Sum_{k=0..n} A101950(n,k)*3^k. - Philippe Deléham, Feb 10 2012
1, 4, 15, 56, 209, ... = INVERT(INVERT(1, 2, 3, 4, 5, ...)). - David Callan, Oct 13 2012
From Peter Bala, Dec 23 2012: (Start)
Product_{n >= 1} (1 + 1/a(n)) = 1 + sqrt(3).
Product_{n >= 2} (1 - 1/a(n)) = 1/4*(1 + sqrt(3)). (End)
a(n+1) = (A001834(n) + A001835(n))/2. a(n+1) + a(n) = A001834(n). a(n+1) - a(n) = A001835(n). - Richard R. Forberg, Sep 04 2013
a(n) = -(-i)^(n+1)*Fibonacci(n, 4*i), i = sqrt(-1). - G. C. Greubel, Jun 06 2019
a(n)^2 - a(m)^2 = a(n+m) * a(n-m), a(n+2)*a(n-2) = 16*a(n+1)*a(n-1) - 15*a(n)^2, a(n+3)*a(n-2) = 15*a(n+2)*a(n-1) - 14*a(n+1)*a(n) for all integer n, m. - Michael Somos, Dec 12 2019
a(n) = 2^n*Sum_{k >= n} binomial(2*k,2*n-1)*(1/3)^(k+1). Cf. A102591. - Peter Bala, Nov 29 2021
a(n) = Sum_{k > 0} (-1)^((k-1)/2)*binomial(2*n, n+k)*(k|12), where (k|12) is the Kronecker symbol. - Greg Dresden, Oct 11 2022
Sum_{k=0..n} a(k) = (a(n+1) - a(n) - 1)/2. - Prabha Sivaramannair, Sep 22 2023
a(2n+1) = A001835(n+1) * A001834(n). - M. Farrokhi D. G., Oct 15 2023
Sum_{n>=1} arctan(1/(4*a(n)^2)) = Pi/12 (A019679) (Ohtskua, 2024). - Amiram Eldar, Aug 29 2024
From Peter Bala, May 21 2025: (Start)
Product_{n >= 1} (1 + 1/a(n))^2 = 2*(2 + sqrt(3)) (telescoping product: (1 + 1/a(2*n-1))^2 * (1 + 1/a(2*n-2))^2 = (4 + 2*A251963(n)/A005246(2*n)^2)/(4 + 2*A251963(n-1)/A005246(2*n-2)^2) ).
Product_{n >= 2} (1 - 1/a(n))^2 = (1/8)*(2 + sqrt(3)).
Product_{n >= 1} ((a(2*n) + 1)/(a(2*n) - 1))^2 = 3 (telescoping product: ((a(2*n) + 1)/(a(2*n) - 1))^2 = (3 - 2/A001835(n+1)^2)/(3 - 2/A001835(n)^2) ).
Product_{n >= 2} ((a(2*n-1) + 1)/(a(2*n-1) - 1))^2 = 4/3.
The o.g.f. A(x) satisfies A(x) + A(-x) + 8*A(x)*A(-x) = 0. The o.g.f. for A007655 equals -A(sqrt(x))*A(-sqrt(x)). (End)

A036987 Fredholm-Rueppel sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Binary representation of the Kempner-Mahler number Sum_{k>=0} 1/2^(2^k) = A007404.
a(n) = (product of digits of n; n in binary notation) mod 2. This sequence is a transformation of the Thue-Morse sequence (A010060), since there exists a function f such that f(sum of digits of n) = (product of digits of n). - Ctibor O. Zizka, Feb 12 2008
a(n-1), n >= 1, the characteristic sequence for powers of 2, A000079, is the unique solution of the following formal product and formal power series identity: Product_{j>=1} (1 + a(j-1)*x^j) = 1 + Sum_{k>=1} x^k = 1/(1-x). The product is therefore Product_{l>=1} (1 + x^(2^l)). Proof. Compare coefficients of x^n and use the binary representation of n. Uniqueness follows from the recurrence relation given for the general case under A147542. - Wolfdieter Lang, Mar 05 2009
a(n) is also the number of orbits of length n for the map x -> 1-cx^2 on [-1,1] at the Feigenbaum critical value c=1.401155... . - Thomas Ward, Apr 08 2009
A054525 (Mobius transform) * A001511 = A036987 = A047999^(-1) * A001511 = the inverse of Sierpiński's gasket * the ruler sequence. - Gary W. Adamson, Oct 26 2009 [Of course this is only vaguely correct depending on how the fuzzy indexing in these formulas is made concrete. - R. J. Mathar, Jun 20 2014]
Characteristic function of A000225. - Reinhard Zumkeller, Mar 06 2012
Also parity of the Catalan numbers A000108. - Omar E. Pol, Jan 17 2012
For n >= 2, also the largest exponent k >= 0 such that n^k in binary notation does not contain both 0 and 1. Unlike for the decimal version of this sequence, A062518, where the terms are only conjectural, for this sequence the values of a(n) can be proved to be the characteristic function of A000225, as follows: n^k will contain both 0 and 1 unless n^k = 2^r-1 for some r. But this is a special case of Catalan's equation x^p = y^q-1, which was proved by Preda Mihăilescu to have no nontrivial solution except 2^3 = 3^2 - 1. - Christopher J. Smyth, Aug 22 2014
Image, under the coding a,b -> 1; c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cb, c -> cc. - Jeffrey Shallit, May 14 2016
Number of nonisomorphic Boolean algebras of order n+1. - Jianing Song, Jan 23 2020

Examples

			G.f. = 1 + x + x^3 + x^7 + x^15 + x^31 + x^63 + x^127 + x^255 + x^511 + ...
a(7) = 1 since 7 = 2^3 - 1, while a(10) = 0 since 10 is not of the form 2^k - 1 for any integer k.
		

Crossrefs

The first row of A073346. Occurs for first time in A073202 as row 6 (and again as row 8).
Congruent to any of the sequences A000108, A007460, A007461, A007463, A007464, A061922, A068068 reduced modulo 2. Characteristic function of A000225.
If interpreted with offset=1 instead of 0 (i.e., a(1)=1, a(2)=1, a(3)=0, a(4)=1, ...) then this is the characteristic function of 2^n (A000079) and as such occurs as the first row of A073265. Also, in that case the INVERT transform will produce A023359.
This is Guy Steele's sequence GS(1, 3), also GS(3, 1) (see A135416).
Cf. A054525, A047999. - Gary W. Adamson, Oct 26 2009

Programs

  • Haskell
    a036987 n = ibp (n+1) where
       ibp 1 = 1
       ibp n = if r > 0 then 0 else ibp n' where (n',r) = divMod n 2
    a036987_list = 1 : f [0,1] where f (x:y:xs) = y : f (x:xs ++ [x,x+y])
    -- Same list generator function as for a091090_list, cf. A091090.
    -- Reinhard Zumkeller, May 19 2015, Apr 13 2013, Mar 13 2013
    
  • Maple
    A036987:= n-> `if`(2^ilog2(n+1) = n+1, 1, 0):
    seq(A036987(n), n=0..128);
  • Mathematica
    RealDigits[ N[ Sum[1/10^(2^n), {n, 0, Infinity}], 110]][[1]]
    (* Recurrence: *)
    t[n_, 1] = 1; t[1, k_] = 1;
    t[n_, k_] := t[n, k] =
      If[n < k, If[n > 1 && k > 1, -Sum[t[k - i, n], {i, 1, n - 1}], 0],
       If[n > 1 && k > 1, Sum[t[n - i, k], {i, 1, k - 1}], 0]];
    Table[t[n, k], {k, n, n}, {n, 104}]
    (* Mats Granvik, Jun 03 2011 *)
    mb2d[n_]:=1 - Module[{n2 = IntegerDigits[n, 2]}, Max[n2] - Min[n2]]; Array[mb2d, 120, 0] (* Vincenzo Librandi, Jul 19 2019 *)
    Table[PadRight[{1},2^k,0],{k,0,7}]//Flatten (* Harvey P. Dale, Apr 23 2022 *)
  • PARI
    {a(n) =( n++) == 2^valuation(n, 2)}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    a(n) = !bitand(n, n+1); \\ Ruud H.G. van Tol, Apr 05 2023
    
  • Python
    from sympy import catalan
    def a(n): return catalan(n)%2 # Indranil Ghosh, May 25 2017
    
  • Python
    def A036987(n): return int(not(n&(n+1))) # Chai Wah Wu, Jul 06 2022

Formula

1 followed by a string of 2^k - 1 0's. Also a(n)=1 iff n = 2^m - 1.
a(n) = a(floor(n/2)) * (n mod 2) for n>0 with a(0)=1. - Reinhard Zumkeller, Aug 02 2002 [Corrected by Mikhail Kurkov, Jul 16 2019]
Sum_{n>=0} 1/10^(2^n) = 0.110100010000000100000000000000010...
1 if n=0, floor(log_2(n+1)) - floor(log_2(n)) otherwise. G.f.: (1/x) * Sum_{k>=0} x^(2^k) = Sum_{k>=0} x^(2^k-1). - Ralf Stephan, Apr 28 2003
a(n) = 1 - A043545(n). - Michael Somos, Aug 25 2003
a(n) = -Sum_{d|n+1} mu(2*d). - Benoit Cloitre, Oct 24 2003
Dirichlet g.f. for right-shifted sequence: 2^(-s)/(1-2^(-s)).
a(n) = A000108(n) mod 2 = A001405(n) mod 2. - Paul Barry, Nov 22 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*Sum_{j=0..k} binomial(k, 2^j-1). - Paul Barry, Jun 01 2006
A000523(n+1) = Sum_{k=1..n} a(k). - Mitch Harris, Jul 22 2011
a(n) = A209229(n+1). - Reinhard Zumkeller, Mar 07 2012
a(n) = Sum_{k=1..n} A191898(n,k)*cos(Pi*(n-1)*(k-1))/n; (conjecture). - Mats Granvik, Mar 04 2013
a(n) = A000035(A000108(n)). - Omar E. Pol, Aug 06 2013
a(n) = 1 iff n=2^k-1 for some k, 0 otherwise. - M. F. Hasler, Jun 20 2014
a(n) = ceiling(log_2(n+2)) - ceiling(log_2(n+1)). - Gionata Neri, Sep 06 2015
From John M. Campbell, Jul 21 2016: (Start)
a(n) = (A000168(n-1) mod 2).
a(n) = (A000531(n+1) mod 2).
a(n) = (A000699(n+1) mod 2).
a(n) = (A000891(n) mod 2).
a(n) = (A000913(n-1) mod 2), for n>1.
a(n) = (A000917(n-1) mod 2), for n>0.
a(n) = (A001142(n) mod 2).
a(n) = (A001246(n) mod 2).
a(n) = (A001246(n) mod 4).
a(n) = (A002057(n-2) mod 2), for n>1.
a(n) = (A002430(n+1) mod 2). (End)
a(n) = 2 - A043529(n). - Antti Karttunen, Nov 19 2017
a(n) = floor(1+log(n+1)/log(2)) - floor(log(2n+1)/log(2)). - Adriano Caroli, Sep 22 2019
This is also the decimal expansion of -Sum_{k>=1} mu(2*k)/(10^k - 1), where mu is the Möbius function (A008683). - Amiram Eldar, Jul 12 2020

Extensions

Edited by M. F. Hasler, Jun 20 2014

A052179 Triangle of numbers arising in enumeration of walks on cubic lattice.

Original entry on oeis.org

1, 4, 1, 17, 8, 1, 76, 50, 12, 1, 354, 288, 99, 16, 1, 1704, 1605, 700, 164, 20, 1, 8421, 8824, 4569, 1376, 245, 24, 1, 42508, 48286, 28476, 10318, 2380, 342, 28, 1, 218318, 264128, 172508, 72128, 20180, 3776, 455, 32, 1, 1137400, 1447338
Offset: 0

Views

Author

N. J. A. Sloane, Jan 26 2000

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given 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) + 4*T(n-1,k) + T(n-1,k+1) for k >= 1. - Philippe Deléham, Mar 27 2007
Triangle read by rows: T(n,k) = number of lattice paths from (0,0) to (n,k) that do not go below the line y=0 and consist of steps U=(1,1), D=(1,-1) and four types of steps H=(1,0); example: T(3,1)=50 because we have UDU, UUD, 16 HHU paths, 16 HUH paths and 16 UHH paths. - Philippe Deléham, Sep 25 2007
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 by 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
Riordan array ((1-4x-sqrt(1-8x+12x^2))/(2x^2), (1-4x-sqrt(1-8x+12x^2))/(2x)). Inverse of A159764. - Paul Barry, Apr 21 2009
6^n = (n-th row terms) dot (first n+1 terms in (1,2,3,...)). Example: 6^3 = 216 = (76, 50, 12, 1) dot (1, 2, 3, 4) = (76 + 100 + 36 + 4) = 216. - Gary W. Adamson, Jun 15 2011
A subset of the "family of triangles" (Deléham comment of Sep 25 2007) is the succession of binomial transforms beginning with triangle A053121, (0,0); giving -> A064189, (1,1); -> A039598, (2,2); -> A091965, (3,3); -> A052179, (4,4); -> A125906, (5,5) ->, etc.; generally the binomial transform of the triangle generated from (n,n) = that generated from ((n+1),(n+1)). - Gary W. Adamson, Aug 03 2011

Examples

			Triangle begins:
    1;
    4,   1;
   17,   8,   1;
   76,  50,  12,   1;
  354, 288,  99,  16,   1;
  ...
Production matrix begins:
  4, 1;
  1, 4, 1;
  0, 1, 4, 1;
  0, 0, 1, 4, 1;
  0, 0, 0, 1, 4, 1;
  0, 0, 0, 0, 1, 4, 1;
  0, 0, 0, 0, 0, 1, 4, 1;
- _Philippe Deléham_, Nov 04 2011
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(min(n, k)<0, 0,
         `if`(max(n, k)=0, 1, T(n-1, k-1)+4*T(n-1, k)+T(n-1, k+1)))
        end:
    seq(seq(T(n,k), k=0..n), n=0..10);  # Alois P. Heinz, Oct 28 2021
  • Mathematica
    t[0, 0] = 1; t[n_, k_] /; k < 0 || k > n = 0; t[n_, 0] := t[n, 0] = 4*t[n-1, 0] + t[n-1, 1]; t[n_, k_] := t[n, k] = t[n-1, k-1] + 4*t[n-1, k] + t[n-1, k+1]; Flatten[ Table[t[n, k], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, Oct 10 2011, after Philippe Deleham *)

Formula

Sum_{k>=0} T(m, k)*T(n, k) = T(m+n, 0) = A005572(m+n). - Philippe Deléham, Sep 15 2005
n-th row = M^n * V, where M = the infinite tridiagonal matrix with all 1's in the super and subdiagonals and (4,4,4,...) in the main diagonal. E.g., Row 3 = (76, 50, 12, 1) since M^3 * V = [76, 50, 12, 1, 0, 0, 0, ...]. - Gary W. Adamson, Nov 04 2006
Sum_{k=0..n} T(n,k) = A005573(n). - Philippe Deléham, Feb 04 2007
Sum_{k=0..n} T(n,k)*(k+1) = 6^n. - Philippe Deléham, Mar 27 2007
Sum_{k=0..n} T(n,k)*x^k = A033543(n), A064613(n), A005572(n), A005573(n) for x = -2, -1, 0, 1 respectively. - Philippe Deléham, Nov 28 2009
As an infinite lower triangular matrix = the binomial transform of A091965 and 4th binomial transform of A053121. - Gary W. Adamson, Aug 03 2011
G.f.: 2/(1 - 4*x - 2*x*y + sqrt(1 - 8*x + 12*x^2)). - Daniel Checa, Aug 17 2022
G.f. for the m-th column: x^m*(A(x))^(m+1), where A(x) is the g.f. of the sequence counting the walks on the cubic lattice starting and finishing on the xy plane and never going below it (A005572). Explicitly, the g.f. is x^m*((1 - 4*x - sqrt(1 - 8*x + 12*x^2))/(2*x^2))^(m+1). - Daniel Checa, Aug 28 2022

A005572 Number of walks on cubic lattice starting and finishing on the xy plane and never going below it.

Original entry on oeis.org

1, 4, 17, 76, 354, 1704, 8421, 42508, 218318, 1137400, 5996938, 31940792, 171605956, 928931280, 5061593709, 27739833228, 152809506582, 845646470616, 4699126915422, 26209721959656, 146681521121244, 823429928805936
Offset: 0

Views

Author

Keywords

Comments

Also number of paths from (0,0) to (n,0) in an n X n grid using only Northeast, East and Southeast steps and the East steps come in four colors. - Emeric Deutsch, Nov 03 2002
Number of skew Dyck paths of semilength n+1 with the left steps coming in two colors. - David Scambler, Jun 21 2013
Number of 2-colored Schroeder paths from (0,0) to (2n+2,0) with no level steps H=(2,0) at an even level. There are two ways to color an H-step at an odd level. Example: a(1)=4 because we have UUDD, UHD (2 choices) and UDUD. - José Luis Ramírez Ramírez, Apr 27 2015

Examples

			a(3) = 76 = sum of top row terms of M^3; i.e., (37 + 29 + 9 + 1).
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Binomial transform of A002212. Sequence shifted right twice is A025228.

Programs

  • Maple
    a := n -> simplify(2^n*hypergeom([3/2, -n], [3], -2)):
    seq(a(n), n=0..21); # Peter Luschny, Feb 03 2015
    a := n -> simplify(GegenbauerC(n, -n-1, -2))/(n+1):
    seq(a(n), n=0..21); # Peter Luschny, May 09 2016
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==4,a[n]==((2n+1)a[n-1]-3(n-1)a[n-2]) 4/(n+2)}, a[n],{n,30}] (* Harvey P. Dale, Oct 04 2011 *)
    a[n_]:=If[n==0,1,Coefficient[(1+4x+x^2)^(n+1),x^n]/(n+1)]
    Table[a[n],{n,0,40}] (* Emanuele Munarini, Apr 06 2012 *)
  • Maxima
    a(n):=coeff(expand((1+4*x+x^2)^(n+1)),x^n)/(n+1); makelist(a(n),n,0,12); /* Emanuele Munarini, Apr 06 2012 */
    
  • PARI
    a(n)=polcoeff((1-4*x-sqrt(1-8*x+12*x^2+x^3*O(x^n)))/2,n+2)
    
  • PARI
    { A005572(n) = sum(k=0,n\2, binomial(n,2*k) * binomial(2*k,k) * 4^(n-2*k) / (k+1) ) } /* Max Alekseyev, Feb 02 2015 */
    
  • PARI
    {a(n)=sum(k=0,n, binomial(n,k) * 2^(n-k) * binomial(2*k+2, k)/(k+1) )}
    for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Feb 02 2015
    
  • Sage
    def A005572(n):
        A108198 = lambda n,k: (-1)^k*catalan_number(k+1)*rising_factorial(-n,k)/factorial(k)
        return sum(A108198(n,k)*2^(n-k) for k in (0..n))
    [A005572(n) for n in range(22)] # Peter Luschny, Feb 05 2015

Formula

Generating function A(x) satisfies 1 + (xA)^2 = A - 4xA.
a(0) = 1 and, for n > 0, a(n) = 4a(n-1) + Sum_{i=1..n-1} a(i-1)*a(n-i-1). - John W. Layman, Jan 07 2000
G.f.: (1 - 4*x - sqrt(1 - 8*x + 12*x^2))/(2*x^2).
D-finite with recurrence: a(n) = ((2*n+1)*a(n-1) - 3*(n-1)*a(n-2))*4/(n+2), n > 0.
a(m+n) = Sum_{k>=0} A052179(m, k)*A052179(n, k) = A052179(m+n, 0). - Philippe Deléham, Sep 15 2005
a(n) = 4*a(n-1) + A052177(n-1) = A052179(n, 0) = 6*A005573(n)-A005573(n-1) = Sum_{j=0..floor(n/2)} 4^(n-2*j)*C(n, 2*j)*C(2*j, j)/(j+1). - Henry Bottomley, Aug 23 2001
a(n) = Sum_{k=0..n} A097610(n,k)*4^k. - Philippe Deléham, Dec 03 2009
Let A(x) be the g.f., then B(x) = 1 + x*A(x) = 1 + 1*x + 4*x^2 + 17*x^3 + ... = 1/(1-z/(1-z/(1-z/(...)))) where z=x/(1-2*x) (continued fraction); more generally B(x) = C(x/(1-2*x)) where C(x) is the g.f. for the Catalan numbers (A000108). - Joerg Arndt, Mar 18 2011
From Gary W. Adamson, Jul 21 2011: (Start)
a(n) = sum of top row terms of 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) ~ 3*6^(n+1/2)/(n^(3/2)*sqrt(Pi)). - Vaclav Kotesovec, Oct 05 2012
a(n) = Sum_{k=0..floor(n/2)} binomial(n,2*k) * binomial(2k,k) * 4^(n-2k) / (k+1). - Max Alekseyev, Feb 02 2015
From Paul D. Hanna, Feb 02 2015: (Start)
a(n) = Sum_{k=0..n} binomial(n,k) * 2^(n-k) * binomial(2*k+2, k)/(k+1).
a(n) = Sum_{k=0..n} binomial(n,k) * 2^(n-k) * A000108(k+1).
a(n) = [x^n] (1 + 4*x + x^2)^(n+1) / (n+1).
G.f.: (1/x) * Series_Reversion( x/(1 + 4*x + x^2) ). (End)
a(n) = 2^n*hypergeom([3/2, -n], [3], -2). - Peter Luschny, Feb 03 2015
a(n) = 4^n*hypergeom([-n/2, (1-n)/2], [2], 1/4). - Robert Israel, Feb 04 2015
a(n) = Sum_{k=0..n} A108198(n,k)*2^(n-k). - Peter Luschny, Feb 05 2015
a(n) = 2*(12^(n/2))*(n!/(n+2)!)*GegenbauerC(n, 3/2,2/sqrt(3)), where GegenbauerC are Gegenbauer polynomials in Maple notation. This is a consequence of Robert Israel's formula. - Karol A. Penson, Feb 20 2015
a(n) = (2^(n+1)*3^((n+1)/2)*P(n+1,1,2/sqrt(3)))/((n+1)*(n+2)) where P(n,u,x) are the associated Legendre polynomials of the first kind. - Peter Luschny, Feb 24 2015
a(n) = -6^(n+1)*sqrt(3)*Integral{t=0..Pi}(cos(t)*(2+cos(t))^(-n-2))/(Pi*(n+2)). - Peter Luschny, Feb 24 2015
From Karol A. Penson and Wojciech Mlotkowski, Mar 16 2015: (Start)
Integral representation as the n-th moment of a positive function defined on a segment x=[2, 6]. This function is the Wigner's semicircle distribution shifted to the right by 4. This representation is unique. In Maple notation,
a(n) = int(x^n*sqrt(4-(x-4)^2)/(2*Pi), x=2..6),
a(n) = 2*6^n*Pochhammer(3/2, n)*hypergeom([-n, 3/2], [-n-1/2], 1/3)/(n+2)!
(End)
a(n) = GegenbauerC(n, -n-1, -2)/(n+1). - Peter Luschny, May 09 2016
E.g.f.: exp(4*x) * BesselI(1,2*x) / x. - Ilya Gutkovskiy, Jun 01 2020
From Peter Bala, Aug 18 2021: (Start)
G.f. A(x) = 1/(1 - 2*x)*c(x/(1 - 2*x))^2, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. Cf. A129400.
Conjecture: a(n) is even except for n of the form 2*(2^k - 1). [added Feb 03: the conjecture follows from the formula a(n) = Sum_{k = 0..n} 2^(n-k)*binomial(n, k)*Catalan(k+1) given above.] (End)
From Peter Bala, Feb 03 2024: (Start)
G.f.: 1/(1 - 2*x) * c(x/(1 - 2*x))^2 = 1/(1 - 6*x) * c(-x/(1 - 6*x))^2, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108.
a(n) = 6^n * Sum_{k = 0..n} (-6)^(-k)*binomial(n, k)*Catalan(k+1).
a(n) = 6^n * hypergeom([-n, 3/2], [3], 2/3). (End)

Extensions

Additional comments from Michael Somos, Jun 10 2000

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

A122898 Expansion of (sqrt(21*x^2 - 10*x + 1) + 7*x - 1) / (2*x*(1 - 7*x)).

Original entry on oeis.org

1, 6, 37, 233, 1491, 9660, 63195, 416610, 2763595, 18426026, 123375927, 829053197, 5588050069, 37764371676, 255800207277, 1736181639585, 11804962371795, 80394249836010, 548283258074895, 3744067955618403, 25596986050620681
Offset: 0

Views

Author

Paul Barry, Sep 18 2006

Keywords

Comments

3rd binomial transform of C(2n+1,n+1) (A001700); 5th binomial transform of C(n,floor(n/2)) (A001405); 7th binomial transform of (-1)^n*A000108(n) = A168491(n). Hankel transform is (1,1,1,.....). Row sums of Riordan array (1/(1+5x+x^2), x/(1+5x+x^2))^(-1). Counts Motzkin paths with 5 colors for horizontal steps. [Corrected by Philippe Deléham, Nov 29 2009]
Binomial transform of A005573. 7th binomial transform of A168491. - Philippe Deléham, Nov 28 2009

Programs

  • Maple
    a := n -> (-1)^n*simplify(GegenbauerC(n,-n,5/2) - GegenbauerC(n-1,-n,5/2)):
    seq(a(n), n=0..21); # Peter Luschny, May 13 2016
  • Mathematica
    CoefficientList[Series[(Sqrt[21*x^2-10*x+1]+7*x-1)/(2*x*(1-7*x)), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 19 2012 *)

Formula

a(n) = Sum{k=0..n, 3^(n-k)C(n,k)C(2k+1,k+1)}.
a(n) = Sum{k=0..n, 5^(n-k)C(n,k)C(k,floor(k/2))}.
a(n) = Sum{k=0..n, 7^(n-k)C(n,k)*(-1)^k*C(k)} where C(n)=A000108(n).
a(n) = Sum{k=0..n, sum{j=0..n, 3^(n-j)*C(n,k)*C(n-k,j-k)*C(j+1,k+1)}}.
G.f.: 1/(1-6x-x^2/(1-5x-x^2/(1-5x-x^2/(1-5x-x^2/(1-...(continued fraction). - Philippe Deléham, Nov 28 2009
D-finite with recurrence: (n+1)*a(n) = 2*(5*n+1)*a(n-1) - 21*(n-1)*a(n-2). - Vaclav Kotesovec, Oct 19 2012
a(n) ~ 7^(n+1/2)/sqrt(Pi*n). - Vaclav Kotesovec, Oct 19 2012
G.f.: G(0)/(2*x) - 1/(2*x), where G(k)= 1 + 4*x*(4*k+1)/( (4*k+2)*(1-3*x) - 2*x*(1-3*x)*(2*k+1)*(4*k+3)/(x*(4*k+3) + (1-3*x)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 24 2013
a(n) = (-1)^n*(GegenbauerC(n,-n,5/2) - GegenbauerC(n-1,-n,5/2)). - Peter Luschny, May 13 2016
E.g.f.: exp(5*x)*(BesselI(0,2*x) + BesselI(1,2*x)). - Ilya Gutkovskiy, Sep 20 2017

A360317 a(n) = Sum_{k=0..n} 2^(n-k) * binomial(n-1,n-k) * binomial(2*k,k).

Original entry on oeis.org

1, 2, 10, 52, 278, 1516, 8388, 46920, 264678, 1503052, 8581676, 49215256, 283297660, 1635904376, 9472214344, 54975423504, 319729353606, 1862896455180, 10871759717916, 63539265366264, 371837338366740, 2178604586281128, 12778264475444280, 75022726995053808
Offset: 0

Views

Author

Seiichi Manyama, Feb 03 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, 2^(n-k)*binomial(n-1, n-k)*binomial(2*k, k));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(sqrt((1-2*x)/(1-6*x)))

Formula

G.f.: sqrt( (1-2*x)/(1-6*x) ).
n*a(n) = 2*(4*n-3)*a(n-1) - 12*(n-2)*a(n-2).
Sum_{i=0..n} Sum_{j=0..i} (1/2)^i * a(j) * a(i-j) = 3^n.
a(n) = 2 * A005573(n-1) for n > 0.
a(n) ~ 2^(n + 1/2) * 3^(n - 1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Feb 04 2023
From Seiichi Manyama, Aug 22 2025: (Start)
a(n) = (1/2)^n * Sum_{k=0..n} 3^k * binomial(2*k,k) * binomial(2*(n-k),n-k)/(1-2*(n-k)).
a(n) = Sum_{k=0..n} (-1)^k * 6^(n-k) * binomial(2*k,k)/(1-2*k) * binomial(n-1,n-k). (End)

A171651 Triangle T, read by rows : T(n,k) = A007318(n,k)*A005773(n+1-k).

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 13, 15, 6, 1, 35, 52, 30, 8, 1, 96, 175, 130, 50, 10, 1, 267, 576, 525, 260, 75, 12, 1, 750, 1869, 2016, 1225, 455, 105, 14, 1, 2123, 6000, 7476, 5376, 2450, 728, 140, 16, 1, 6046, 19107, 27000, 22428, 12096, 4410, 1092, 180, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2009

Keywords

Examples

			Triangle begins:
   1;
   2,   1;
   5,   4,  1;
  13,  15,  6, 1;
  35,  52, 30, 8, 1;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(u, d, t) option remember; `if`(u=0 and d=0, 1/2,
          expand(`if`(u=0, 0, b(u-1, d, 2)*`if`(t=3, x, 1))
          +`if`(d=0, 0, b(u, d-1, `if`(t=2, 3, 1)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n+1$2, 1)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Apr 29 2015
    # second program:
    A171651:= (n, k)-> binomial(n,k)*add((-1)^(n-k-j)*binomial(n-k,j)*binomial(2*j+1,j+1),j=0..n-k): seq(print(seq(A171651(n, k), k=0..n)), n=0..9);  # Mélika Tebni, Dec 16 2023
  • Mathematica
    b[u_, d_, t_] := b[u, d, t] = If[u == 0 && d == 0, 1/2, Expand[If[u == 0, 0, b[u-1, d, 2]*If[t == 3, x, 1]] + If[d == 0, 0, b[u, d-1, If[t == 2, 3, 1]]]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n+1, n+1, 1] ];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 21 2016, after Alois P. Heinz *)

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A168491(n), A099323(n), A001405(n), A005773(n+1), A001700(n), A026378(n+1), A005573(n), A122898(n) for x = -3, -2, -1, 0, 1, 2, 3, 4 respectively.
E.g.f. of column k: exp(x)*(BesselI(0,2*x)+BesselI(1,2*x))*x^k / k!. - Mélika Tebni, Dec 16 2023

Extensions

Corrected by Philippe Deléham, Dec 18 2009

A171568 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A064613.

Original entry on oeis.org

1, 3, 1, 10, 6, 1, 37, 29, 9, 1, 150, 134, 57, 12, 1, 654, 622, 318, 94, 15, 1, 3012, 2948, 1686, 616, 140, 18, 1, 14445, 14317, 8781, 3693, 1055, 195, 21, 1, 71398, 71142, 45625, 21132, 7075, 1662, 259, 24, 1, 361114, 360602, 238170, 118042, 44303, 12345, 2464, 332, 27, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 11 2009

Keywords

Comments

Equal to A171515*B = B*A104259, B = A007318.

Examples

			Triangle T(n,k) begins
[0]     1;
[1]     3,     1;
[2]    10,     6,     1;
[3]    37,    29,     9,     1;
[4]   150,   134,    57,    12,    1;
[5]   654,   622,   318,    94,   15,    1;
[6]  3012,  2948,  1686,   616,  140,   18,   1;
[7] 14445, 14317,  8781,  3693, 1055,  195,  21,  1;
[8] 71398, 71142, 45625, 21132, 7075, 1662, 259, 24, 1;
.
Production array begins
  3, 1
  1, 3, 1
  1, 1, 3, 1
  1, 1, 1, 3, 1
  1, 1, 1, 1, 3, 1
  1, 1, 1, 1, 1, 3, 1
- _Philippe Deléham_, Mar 05 2013
		

Crossrefs

Sum_{k=0..n} T(n,k)*x^k = A033543(n), A064613(n), A005572(n), A005573(n) for x = -1, 0, 1, 2 respectively.

Programs

  • Maple
    T := proc(n,k) option remember;
    if n < 0 or k < 0 then 0 elif n = k then 1 else
    T(n-1, k-1) + 3*T(n-1,k) + add(T(n-1, k+1+i), i=0..n) fi end:
    for n from 0 to 8 do seq(T(n,k), k = 0..n) od; # Peter Luschny, Oct 16 2022
  • Mathematica
    T[n_, k_] := T[n, k] = If[n < 0 || k < 0, 0, If[n == k, 1, T[n-1, k-1] + 3*T[n-1, k] + Sum[T[n-1, k+1+i], {i, 0, n}]]];
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 23 2024, after Peter Luschny *)

Formula

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

Extensions

Corrected and extended by Peter Luschny, Oct 16 2022

A171515 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A033543.

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 16, 14, 6, 1, 62, 52, 27, 8, 1, 270, 213, 116, 44, 10, 1, 1257, 948, 513, 216, 65, 12, 1, 6096, 4470, 2376, 1038, 360, 90, 14, 1, 30398, 21904, 11468, 5056, 1880, 556, 119, 16, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2009

Keywords

Comments

Equal to B^2*A039598*B^(-2), B = A007318.

Examples

			Triangle begins : 1 ; 2,1 : 5,4,1 ; 16,14,6,1 ; 62,52,27,8,1 ; ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A033543(n), A064613(n), A005572(n), A005573(n) for x = 0, 1, 2, 3 respectively.
T(n,k) = T(n-1,k-1) + 2*T(n-1,k) + sum_{i, i>=0} T(n-1,k+1+i)*2^i. - Philippe Deléham, Feb 23 2012
Showing 1-10 of 14 results. Next