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

A001519 a(n) = 3*a(n-1) - a(n-2) for n >= 2, with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 5, 13, 34, 89, 233, 610, 1597, 4181, 10946, 28657, 75025, 196418, 514229, 1346269, 3524578, 9227465, 24157817, 63245986, 165580141, 433494437, 1134903170, 2971215073, 7778742049, 20365011074, 53316291173, 139583862445, 365435296162, 956722026041
Offset: 0

Views

Author

Keywords

Comments

This is a bisection of the Fibonacci sequence A000045. a(n) = F(2*n-1), with F(n) = A000045(n) and F(-1) = 1.
Number of ordered trees with n+1 edges and height at most 3 (height=number of edges on a maximal path starting at the root). Number of directed column-convex polyominoes of area n+1. Number of nondecreasing Dyck paths of length 2n+2. - Emeric Deutsch, Jul 11 2001
Terms are the solutions x to: 5x^2-4 is a square, with 5x^2-4 in A081071 and sqrt(5x^2-4) in A002878. - Benoit Cloitre, Apr 07 2002
a(0) = a(1) = 1, a(n+1) is the smallest Fibonacci number greater than the n-th partial sum. - Amarnath Murthy, Oct 21 2002
The fractional part of tau*a(n) decreases monotonically to zero. - Benoit Cloitre, Feb 01 2003
Numbers k such that floor(phi^2*k^2) - floor(phi*k)^2 = 1 where phi=(1+sqrt(5))/2. - Benoit Cloitre, Mar 16 2003
Number of leftist horizontally convex polyominoes with area n+1.
Number of 31-avoiding words of length n on alphabet {1,2,3} which do not end in 3. (E.g., at n=3, we have 111, 112, 121, 122, 132, 211, 212, 221, 222, 232, 321, 322 and 332.) See A028859. - Jon Perry, Aug 04 2003
Appears to give all solutions > 1 to the equation: x^2 = ceiling(x*r*floor(x/r)) where r=phi=(1+sqrt(5))/2. - Benoit Cloitre, Feb 24 2004
a(1) = 1, a(2) = 2, then the least number such that the square of any term is just less than the geometric mean of its neighbors. a(n+1)*a(n-1) > a(n)^2. - Amarnath Murthy, Apr 06 2004
All positive integer solutions of Pell equation b(n)^2 - 5*a(n+1)^2 = -4 together with b(n)=A002878(n), n >= 0. - Wolfdieter Lang, Aug 31 2004
Essentially same as Pisot sequence E(2,5).
Number of permutations of [n+1] avoiding 321 and 3412. E.g., a(3) = 13 because the permutations of [4] avoiding 321 and 3412 are 1234, 2134, 1324, 1243, 3124, 2314, 2143, 1423, 1342, 4123, 3142, 2413, 2341. - Bridget Tenner, Aug 15 2005
Number of 1324-avoiding circular permutations on [n+1].
A subset of the Markoff numbers (A002559). - Robert G. Wilson v, Oct 05 2005
(x,y) = (a(n), a(n+1)) are the solutions of x/(yz) + y/(xz) + z/(xy) = 3 with z=1. - Floor van Lamoen, Nov 29 2001
Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 5 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 1, s(2n) = 1. - Herbert Kociemba, Jun 10 2004
With interpolated zeros, counts closed walks of length n at the start or end node of P_4. a(n) counts closed walks of length 2n at the start or end node of P_4. The sequence 0,1,0,2,0,5,... counts walks of length n between the start and second node of P_4. - Paul Barry, Jan 26 2005
a(n) is the number of ordered trees on n edges containing exactly one non-leaf vertex all of whose children are leaves (every ordered tree must contain at least one such vertex). For example, a(0) = 1 because the root of the tree with no edges is not considered to be a leaf and the condition "all children are leaves" is vacuously satisfied by the root and a(4) = 13 counts all 14 ordered trees on 4 edges (A000108) except (ignore dots)
|..|
.\/.
which has two such vertices. - David Callan, Mar 02 2005
Number of directed column-convex polyominoes of area n. Example: a(2)=2 because we have the 1 X 2 and the 2 X 1 rectangles. - Emeric Deutsch, Jul 31 2006
Same as the number of Kekulé structures in polyphenanthrene in terms of the number of hexagons in extended (1,1)-nanotubes. See Table 1 on page 411 of I. Lukovits and D. Janezic. - Parthasarathy Nambi, Aug 22 2006
Number of free generators of degree n of symmetric polynomials in 3-noncommuting variables. - Mike Zabrocki, Oct 24 2006
Inverse: With phi = (sqrt(5) + 1)/2, log_phi((sqrt(5)*a(n) + sqrt(5*a(n)^2 - 4))/2) = n for n >= 1. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
Consider a teacher who teaches one student, then he finds he can teach two students while the original student learns to teach a student. And so on with every generation an individual can teach one more student then he could before. a(n) starting at a(2) gives the total number of new students/teachers (see program). - Ben Paul Thurston, Apr 11 2007
The Diophantine equation a(n)=m has a solution (for m >= 1) iff ceiling(arcsinh(sqrt(5)*m/2)/log(phi)) != ceiling(arccosh(sqrt(5)*m/2)/log(phi)) where phi is the golden ratio. An equivalent condition is A130255(m)=A130256(m). - Hieronymus Fischer, May 24 2007
a(n+1) = B^(n)(1), n >= 0, with compositions of Wythoff's complementary A(n):=A000201(n) and B(n)=A001950(n) sequences. See the W. Lang link under A135817 for the Wythoff representation of numbers (with A as 1 and B as 0 and the argument 1 omitted). E.g., 2=`0`, 5=`00`, 13=`000`, ..., in Wythoff code.
Bisection of the Fibonacci sequence into odd-indexed nonzero terms (1, 2, 5, 13, ...) and even-indexed terms (1, 3, 8, 21, ...) may be represented as row sums of companion triangles A140068 and A140069. - Gary W. Adamson, May 04 2008
a(n) is the number of partitions pi of [n] (in standard increasing form) such that Flatten[pi] is a (2-1-3)-avoiding permutation. Example: a(4)=13 counts all 15 partitions of [4] except 13/24 and 13/2/4. Here "standard increasing form" means the entries are increasing in each block and the blocks are arranged in increasing order of their first entries. Also number that avoid 3-1-2. - David Callan, Jul 22 2008
Let P be the partial sum operator, A000012: (1; 1,1; 1,1,1; ...) and A153463 = M, the partial sum & shift operator. It appears that beginning with any randomly taken sequence S(n), iterates of the operations M * S(n), -> M * ANS, -> P * ANS, etc. (or starting with P) will rapidly converge upon a two-sequence limit cycle of (1, 2, 5, 13, 34, ...) and (1, 1, 3, 8, 21, ...). - Gary W. Adamson, Dec 27 2008
Number of musical compositions of Rhythm-music over a time period of n-1 units. Example: a(4)=13; indeed, denoting by R a rest over a time period of 1 unit and by N[j] a note over a period of j units, we have (writing N for N[1]): NNN, NNR, NRN, RNN, NRR, RNR, RRN, RRR, N[2]R, RN[2], NN[2], N[2]N, N[3] (see the J. Groh reference, pp. 43-48). - Juergen K. Groh (juergen.groh(AT)lhsystems.com), Jan 17 2010
Given an infinite lower triangular matrix M with (1, 2, 3, ...) in every column but the leftmost column shifted upwards one row. Then (1, 2, 5, ...) = lim_{n->infinity} M^n. (Cf. A144257.) - Gary W. Adamson, Feb 18 2010
As a fraction: 8/71 = 0.112676 or 98/9701 = 0.010102051334... (fraction 9/71 or 99/9701 for sequence without initial term). 19/71 or 199/9701 for sequence in reverse. - Mark Dols, May 18 2010
For n >= 1, a(n) is the number of compositions (ordered integer partitions) of 2n-1 into an odd number of odd parts. O.g.f.: (x-x^3)/(1-3x^2+x^4) = A(A(x)) where A(x) = 1/(1-x)-1/(1-x^2).
For n > 0, determinant of the n X n tridiagonal matrix with 1's in the super and subdiagonals, (1,3,3,3,...) in the main diagonal, and the rest zeros. - Gary W. Adamson, Jun 27 2011
The Gi3 sums, see A180662, of the triangles A108299 and A065941 equal the terms of this sequence without a(0). - Johannes W. Meijer, Aug 14 2011
The number of permutations for which length equals reflection length. - Bridget Tenner, Feb 22 2012
Number of nonisomorphic graded posets with 0 and 1 and uniform Hasse graph of rank n+1, with exactly 2 elements of each rank between 0 and 1. (Uniform used in the sense of Retakh, Serconek and Wilson. Graded used in R. Stanley's sense that all maximal chains have the same length.)
HANKEL transform of sequence and the sequence omitting a(0) is the sequence A019590(n). This is the unique sequence with that property. - Michael Somos, May 03 2012
The number of Dyck paths of length 2n and height at most 3. - Ira M. Gessel, Aug 06 2012
Pisano period lengths: 1, 3, 4, 3, 10, 12, 8, 6, 12, 30, 5, 12, 14, 24, 20, 12, 18, 12, 9, 30, ... - R. J. Mathar, Aug 10 2012
Primes in the sequence are 2, 5, 13, 89, 233, 1597, 28657, ... (apparently A005478 without the 3). - R. J. Mathar, May 09 2013
a(n+1) is the sum of rising diagonal of the Pascal triangle written as a square - cf. comments in A085812. E.g., 13 = 1+5+6+1. - John Molokach, Sep 26 2013
a(n) is the top left entry of the n-th power of any of the 3 X 3 matrices [1, 1, 1; 1, 1, 1; 0, 1, 1] or [1, 1, 1; 0, 1, 1; 1, 1, 1] or [1, 1, 0; 1, 1, 1; 1, 1, 1] or [1, 0, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
Except for the initial term, positive values of x (or y) satisfying x^2 - 3xy + y^2 + 1 = 0. - Colin Barker, Feb 04 2014
Except for the initial term, positive values of x (or y) satisfying x^2 - 18xy + y^2 + 64 = 0. - Colin Barker, Feb 16 2014
Positive values of x such that there is a y satisfying x^2 - xy - y^2 - 1 = 0. - Ralf Stephan, Jun 30 2014
a(n) is also the number of permutations simultaneously avoiding 231, 312 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl, Aug 07 2014
(1, a(n), a(n+1)), n >= 0, are Markoff triples (see A002559 and Robert G. Wilson v's Oct 05 2005 comment). In the Markoff tree they give one of the outer branches. Proof: a(n)*a(n+1) - 1 = A001906(2*n)^2 = (a(n+1) - a(n))^2 = a(n)^2 + a(n+1)^2 - 2*a(n)*a(n+1), thus 1^2 + a(n)^2 + a(n+1)^2 = 3*a(n)*a(n+1). - Wolfdieter Lang, Jan 30 2015
For n > 0, a(n) is the smallest positive integer not already in the sequence such that a(1) + a(2) + ... + a(n) is a Fibonacci number. - Derek Orr, Jun 01 2015
Number of vertices of degree n-2 (n >= 3) in all Fibonacci cubes, see Klavzar, Mollard, & Petkovsek. - Emeric Deutsch, Jun 22 2015
Except for the first term, this sequence can be generated by Corollary 1 (ii) of Azarian's paper in the references for this sequence. - Mohammad K. Azarian, Jul 02 2015
Precisely the numbers F(n)^k + F(n+1)^k that are also Fibonacci numbers with k > 1, see Luca & Oyono. - Charles R Greathouse IV, Aug 06 2015
a(n) = MA(n) - 2*(-1)^n where MA(n) is exactly the maximum area of a quadrilateral with lengths of sides in order L(n-2), L(n-2), F(n+1), F(n+1) for n > 1 and L(n)=A000032(n). - J. M. Bergot, Jan 28 2016
a(n) is the number of bargraphs of semiperimeter n+1 having no valleys (i.e., convex bargraphs). Equivalently, number of bargraphs of semiperimeter n+1 having exactly 1 peak. Example: a(5) = 34 because among the 35 (=A082582(6)) bargraphs of semiperimeter 6 only the one corresponding to the composition [2,1,2] has a valley. - Emeric Deutsch, Aug 12 2016
Integers k such that the fractional part of k*phi is less than 1/k. See Byszewski link p. 2. - Michel Marcus, Dec 10 2016
Number of words of length n-1 over {0,1,2,3} in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
With a(0) = 0 this is the Riordan transform with the Riordan matrix A097805 (of the associated type) of the Fibonacci sequence A000045. See a Feb 17 2017 comment on A097805. - Wolfdieter Lang, Feb 17 2017
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) < e(j) < e(k). [Martinez and Savage, 2.12] - Eric M. Schmidt, Jul 17 2017
Number of permutations of [n] that avoid the patterns 321 and 2341. - Colin Defant, May 11 2018
The sequence solves the following problem: find all the pairs (i,j) such that i divides 1+j^2 and j divides 1+i^2. In fact, the pairs (a(n), a(n+1)), n > 0, are all the solutions. - Tomohiro Yamada, Dec 23 2018
Number of permutations in S_n whose principal order ideals in the Bruhat order are lattices (equivalently, modular, distributive, Boolean lattices). - Bridget Tenner, Jan 16 2020
From Wolfdieter Lang, Mar 30 2020: (Start)
a(n) is the upper left entry of the n-th power of the 2 X 2 tridiagonal matrix M_2 = Matrix([1,1], [1,2]) from A322602: a(n) = ((M_2)^n)[1,1].
Proof: (M_2)^2 = 3*M + 1_2 (with the 2 X 2 unit matrix 1_2) from the characteristic polynomial of M_2 (see a comment in A322602) and the Cayley-Hamilton theorem. The recurrence M^n = M*M^(n-1) leads to (M_n)^n = S(n, 3)*1_2 + S(n-a, 3)*(M - 3*1_2), for n >= 0, with S(n, 3) = F(2(n+1)) = A001906(n+1). Hence ((M_2)^n)[1,1] = S(n, 3) - 2*S(n-1, 3) = a(n) = F(2*n-1) = (1/(2*r+1))*r^(2*n-1)*(1 + (1/r^2)^(2*n-1)), with r = rho(5) = A001622 (golden ratio) (see the first Aug 31 2004 formula, using the recurrence of S(n, 3), and the Michael Somos Oct 28 2002 formula). This proves a conjecture of Gary W. Adamson in A322602.
The ratio a(n)/a(n-1) converges to r^2 = rho(5)^2 = A104457 for n -> infinity (see the a(n) formula in terms of r), which is one of the statements by Gary W. Adamson in A322602. (End)
a(n) is the number of ways to stack coins with a bottom row of n coins such that any coin not on the bottom row touches exactly two coins in the row below, and all the coins on any row are contiguous [Wilf, 2.12]. - Greg Dresden, Jun 29 2020
a(n) is the upper left entry of the (2*n)-th power of the 4 X 4 Jacobi matrix L with L(i,j)=1 if |i-j| = 1 and L(i,j)=0 otherwise. - Michael Shmoish, Aug 29 2020
All positive solutions of the indefinite binary quadratic F(1, -3, 1) := x^2 - 3*x*y + y^2, of discriminant 5, representing -1 (special Markov triples (1, y=x, z=y) if y <= z) are [x(n), y(n)] = [abs(F(2*n+1)), abs(F(2*n-1))], for n = -infinity..+infinity. (F(-n) = (-1)^(n+1)*F(n)). There is only this single family of proper solutions, and there are no improper solutions. [See also the Floor van Lamoen Nov 29 2001 comment, which uses this negative n, and my Jan 30 2015 comment.] - Wolfdieter Lang, Sep 23 2020
These are the denominators of the lower convergents to the golden ratio, tau; they are also the numerators of the upper convergents (viz. 1/1 < 3/2 < 8/5 < 21/13 < ... < tau < ... 13/8 < 5/3 < 2/1). - Clark Kimberling, Jan 02 2022
a(n+1) is the number of subgraphs of the path graph on n vertices. - Leen Droogendijk, Jun 17 2023
For n > 4, a(n+2) is the number of ways to tile this 3 x n "double-box" shape with squares and dominos (reflections or rotations are counted as distinct tilings). The double-box shape is made up of two horizontal strips of length n, connected by three vertical columns of length 3, and the center column can be located anywhere not touching the two outside columns.
_ _ _ _
|||_|||_|||_|||_|||
|| _ |_| _ _ ||
|||_|||_|||_|||_|||. - Greg Dresden and Ruishan Wu, Aug 25 2024
a(n+1) is the number of integer sequences a_1, ..., a_n such that for any number 1 <= k <= n, (a_1 + ... + a_k)^2 = a_1^3 + ... + a_k^3. - Yifan Xie, Dec 07 2024

Examples

			a(3) = 13: there are 14 ordered trees with 4 edges; all of them, except for the path with 4 edges, have height at most 3.
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 13,15.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 188.
  • N. G. de Bruijn, D. E. Knuth, and S. O. Rice, The average height of planted plane trees, in: Graph Theory and Computing (ed. T. C. Read), Academic Press, New York, 1972, pp. 15-22.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Jurgen Groh, Computerimprovisation mit Markoffketten und "kognitiven Algorithmen", Studienarbeit, Technische Hochschule Darmstadt, 1987.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 39.
  • 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).
  • R. Stanley, Enumerative combinatorics, Vol. 1. Cambridge University Press, Cambridge, 1997, pp. 96-100.
  • H. S. Wilf, Generatingfunctionology, 3rd ed., A K Peters Ltd., Wellesley, MA, 2006, p. 41.

Crossrefs

Fibonacci A000045 = union of this sequence and A001906.
a(n)= A060920(n, 0).
Row 3 of array A094954.
Equals A001654(n+1) - A001654(n-1), n > 0.
A122367 is another version. Inverse sequences A130255 and A130256. Row sums of A140068, A152251, A153342, A179806, A179745, A213948.

Programs

  • GAP
    a:=[1,1];; for n in [3..10^2] do a[n]:=3*a[n-1]-a[n-2]; od; a; # Muniru A Asiru, Sep 27 2017
  • Haskell
    a001519 n = a001519_list !! n
    a001519_list = 1 : zipWith (-) (tail a001906_list) a001906_list
    -- Reinhard Zumkeller, Jan 11 2012
    a001519_list = 1 : f a000045_list where f (_:x:xs) = x : f xs
    -- Reinhard Zumkeller, Aug 09 2013
    
  • Magma
    [1] cat [(Lucas(2*n) - Fibonacci(2*n))/2: n in [1..50]]; // Vincenzo Librandi, Jul 02 2014
    
  • Maple
    A001519:=-(-1+z)/(1-3*z+z**2); # Simon Plouffe in his 1992 dissertation; gives sequence without an initial 1
    A001519 := proc(n) option remember: if n=0 then 1 elif n=1 then 1 elif n>=2 then 3*procname(n-1)-procname(n-2) fi: end: seq(A001519(n), n=0..28); # Johannes W. Meijer, Aug 14 2011
  • Mathematica
    Fibonacci /@ (2Range[29] - 1) (* Robert G. Wilson v, Oct 05 2005 *)
    LinearRecurrence[{3, -1}, {1, 1}, 29] (* Robert G. Wilson v, Jun 28 2012 *)
    a[ n_] := With[{c = Sqrt[5]/2}, ChebyshevT[2 n - 1, c]/c]; (* Michael Somos, Jul 08 2014 *)
    CoefficientList[ Series[(1 - 2x)/(1 - 3x + x^2), {x, 0, 30}], x] (* Robert G. Wilson v, Feb 01 2015 *)
  • Maxima
    a[0]:1$ a[1]:1$ a[n]:=3*a[n-1]-a[n-2]$ makelist(a[n],n,0,30); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    {a(n) = fibonacci(2*n - 1)}; /* Michael Somos, Jul 19 2003 */
    
  • PARI
    {a(n) = real( quadgen(5) ^ (2*n))}; /* Michael Somos, Jul 19 2003 */
    
  • PARI
    {a(n) = subst( poltchebi(n) + poltchebi(n - 1), x, 3/2) * 2/5}; /* Michael Somos, Jul 19 2003 */
    
  • Sage
    [lucas_number1(n,3,1)-lucas_number1(n-1,3,1) for n in range(30)] # Zerinvary Lajos, Apr 29 2009
    

Formula

G.f.: (1-2*x)/(1-3*x+x^2).
G.f.: 1 / (1 - x / (1 - x / (1 - x))). - Michael Somos, May 03 2012
a(n) = A001906(n+1) - 2*A001906(n).
a(n) = a(1-n) for all n in Z.
a(n+2) = (a(n+1)^2+1)/a(n) with a(1)=1, a(2)=2. - Benoit Cloitre, Aug 29 2002
a(n) = (phi^(2*n-1) + phi^(1-2*n))/sqrt(5) where phi=(1+sqrt(5))/2. - Michael Somos, Oct 28 2002
a(n) = A007598(n-1) + A007598(n) = A000045(n-1)^2 + A000045(n)^2 = F(n)^2 + F(n+1)^2. - Henry Bottomley, Feb 09 2001
a(n) = Sum_{k=0..n} binomial(n+k, 2*k). - Len Smiley, Dec 09 2001
a(n) ~ (1/5)*sqrt(5)*phi^(2*n+1). - Joe Keane (jgk(AT)jgk.org), May 15 2002
a(n) = Sum_{k=0..n} C(n, k)*F(k+1). - Benoit Cloitre, Sep 03 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i); then q(n, 1)=a(n) (this comment is essentially the same as that of L. Smiley). - Benoit Cloitre, Nov 10 2002
a(n) = (1/2)*(3*a(n-1) + sqrt(5*a(n-1)^2-4)). - Benoit Cloitre, Apr 12 2003
Main diagonal of array defined by T(i, 1) = T(1, j) = 1, T(i, j) = max(T(i-1, j) + T(i-1, j-1); T(i-1, j-1) + T(i, j-1)). - Benoit Cloitre, Aug 05 2003
Hankel transform of A002212. E.g., Det([1, 1, 3;1, 3, 10;3, 10, 36]) = 5. - Philippe Deléham, Jan 25 2004
Solutions x > 0 to equation floor(x*r*floor(x/r)) = floor(x/r*floor(x*r)) when r=phi. - Benoit Cloitre, Feb 15 2004
a(n) = Sum_{i=0..n} binomial(n+i, n-i). - Jon Perry, Mar 08 2004
a(n) = S(n-1, 3) - S(n-2, 3) = T(2*n-1, sqrt(5)/2)/(sqrt(5)/2) with S(n, x) = U(n, x/2), resp. T(n, x), Chebyshev's polynomials of the second, resp. first kind. See triangle A049310, resp. A053120. - Wolfdieter Lang, Aug 31 2004
a(n) = ((-1)^(n-1))*S(2*(n-1), i), with the imaginary unit i and S(n, x) = U(n, x/2) Chebyshev's polynomials of the second kind, A049310. - Wolfdieter Lang, Aug 31 2004
a(n) = Sum_{0<=i_1<=i_2<=n} binomial(i_2, i_1)*binomial(n, i_1+i_2). - Benoit Cloitre, Oct 14 2004
a(n) = L(n,3), where L is defined as in A108299; see also A002878 for L(n,-3). - Reinhard Zumkeller, Jun 01 2005
a(n) = a(n-1) + Sum_{i=0..n-1} a(i)*a(n) = F(2*n+1)*Sum_{i=0..n-1} a(i) = F(2*n). - Andras Erszegi (erszegi.andras(AT)chello.hu), Jun 28 2005
The i-th term of the sequence is the entry (1, 1) of the i-th power of the 2 X 2 matrix M = ((1, 1), (1, 2)). - Simone Severini, Oct 15 2005
a(n-1) = (1/n)*Sum_{k=0..n} B(2*k)*F(2*n-2*k)*binomial(2*n, 2*k) where B(2*k) is the (2*k)-th Bernoulli number. - Benoit Cloitre, Nov 02 2005
a(n) = A055105(n,1) + A055105(n,2) + A055105(n,3) = A055106(n,1) + A055106(n,2). - Mike Zabrocki, Oct 24 2006
a(n) = (2/sqrt(5))*cosh((2n-1)*psi), where psi=log(phi) and phi=(1+sqrt(5))/2. - Hieronymus Fischer, Apr 24 2007
a(n) = (phi+1)^n - phi*A001906(n) with phi=(1+sqrt(5))/2. - Reinhard Zumkeller, Nov 22 2007
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3); a(n) = ((sqrt(5) + 5)/10)*(3/2 + sqrt(5)/2)^(n-2) + ((-sqrt(5) + 5)/10)*(3/2 - sqrt(5)/2)^(n-2). - Antonio Alberto Olivares, Mar 21 2008
a(n) = A147703(n,0). - Philippe Deléham, Nov 29 2008
Sum_{n>=0} atan(1/a(n)) = (3/4)*Pi. - Jaume Oliver Lafont, Feb 27 2009
With X,Y defined as X = ( F(n) F(n+1) ), Y = ( F(n+2) F(n+3) ), where F(n) is the n-th Fibonacci number (A000045), it follows a(n+2) = X.Y', where Y' is the transpose of Y (n >= 0). - K.V.Iyer, Apr 24 2009
From Gary Detlefs, Nov 22 2010: (Start)
a(n) = Fibonacci(2*n+2) mod Fibonacci(2*n), n > 1.
a(n) = (Fibonacci(n-1)^2 + Fibonacci(n)^2 + Fibonacci(2*n-1))/2. (End)
INVERT transform is A166444. First difference is A001906. Partial sums is A055588. Binomial transform is A093129. Binomial transform of A000045(n-1). - Michael Somos, May 03 2012
a(n) = 2^n*f(n;1/2), where f(n;d), n=0,1,...,d, denote the so-called delta-Fibonacci numbers (see Witula et al. papers and comments in A000045). - Roman Witula, Jul 12 2012
a(n) = (Fibonacci(n+2)^2 + Fibonacci(n-3)^2)/5. - Gary Detlefs, Dec 14 2012
G.f.: 1 + x/( Q(0) - x ) where Q(k) = 1 - x/(x*k + 1 )/Q(k+1); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 23 2013
G.f.: (1-2*x)*G(0)/(2-3*x), where G(k) = 1 + 1/( 1 - x*(5*k-9)/(x*(5*k-4) - 6/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 19 2013
G.f.: 1 + x*(1-x^2)*Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 + 2*x - x^2)/( x*(4*k+4 + 2*x - x^2 ) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 11 2013
G.f.: Q(0,u), where u=x/(1-x), Q(k,u) = 1 + u^2 + (k+2)*u - u*(k+1 + u)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
Sum_{n>=2} 1/(a(n) - 1/a(n)) = 1. Compare with A001906, A007805 and A097843. - Peter Bala, Nov 29 2013
Let F(n) be the n-th Fibonacci number, A000045(n), and L(n) be the n-th Lucas number, A000032(n). Then for n > 0, a(n) = F(n)*L(n-1) + (-1)^n. - Charlie Marion, Jan 01 2014
a(n) = A238731(n,0). - Philippe Deléham, Mar 05 2014
1 = a(n)*a(n+2) - a(n+1)*a(n+1) for all n in Z. - Michael Somos, Jul 08 2014
a(n) = (L(2*n+4) + L(2*n-6))/25 for L(n)=A000032(n). - J. M. Bergot, Dec 30 2014
a(n) = (L(n-1)^2 + L(n)^2)/5 with L(n)=A000032(n). - J. M. Bergot, Dec 31 2014
a(n) = (L(n-2)^2 + L(n+1)^2)/10 with L(n)=A000032(n). - J. M. Bergot, Oct 23 2015
a(n) = 3*F(n-1)^2 + F(n-3)*F(n) - 2*(-1)^n. - J. M. Bergot, Feb 17 2016
a(n) = (F(n-1)*L(n) + F(n)*L(n-1))/2 = (A081714(n-1) + A128534(n))/2. - J. M. Bergot, Mar 22 2016
E.g.f.: (2*exp(sqrt(5)*x) + 3 + sqrt(5))*exp(-x*(sqrt(5)-3)/2)/(5 + sqrt(5)). - Ilya Gutkovskiy, Jul 04 2016
a(n) = ((M_2)^n)[1,1] = S(n, 3) - 2*S(n-1, 3), with the 2 X 2 tridiagonal matrix M_2 = Matrix([1,1], [1,2]) from A322602. For a proof see the Mar 30 2020 comment above. - Wolfdieter Lang, Mar 30 2020
Sum_{n>=1} 1/a(n) = A153387. - Amiram Eldar, Oct 05 2020
a(n+1) = Product_{k=1..n} (1 + 4*cos(2*Pi*k/(2*n + 1))^2). Special case of A099390. - Greg Dresden, Oct 16 2021
a(n+1) = 4^(n+1)*Sum_{k >= n} binomial(2*k,2*n)*(1/5)^(k+1). Cf. A102591. - Peter Bala, Nov 29 2021
a(n) = cosh((2*n-1)*arcsinh(1/2))/sqrt(5/4). - Peter Luschny, May 21 2022
From J. M. Bergot, May 27 2022: (Start)
a(n) = F(n-1)*L(n) - (-1)^n where L(n)=A000032(n) and F(n)=A000045(n).
a(n) = (L(n-1)^2 + L(n-1)*L(n+1))/5 + (-1)^n.
a(n) = 2*(area of a triangle with vertices at (L(n-2), L(n-1)), (F(n), F(n-1)), (L(n), L(n+1))) + 5*(-1)^n for n > 2. (End)
a(n) = A059929(n-1)+A059929(n-2), n>1. - R. J. Mathar, Jul 09 2024

Extensions

Entry revised by N. J. A. Sloane, Aug 24 2006, May 13 2008

A007477 Shifts 2 places left when convolved with itself.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 11, 22, 44, 90, 187, 392, 832, 1778, 3831, 8304, 18104, 39666, 87296, 192896, 427778, 951808, 2124135, 4753476, 10664458, 23981698, 54045448, 122041844, 276101386, 625725936, 1420386363, 3229171828, 7351869690, 16760603722, 38258956928, 87437436916, 200057233386, 458223768512, 1050614664580
Offset: 0

Views

Author

Keywords

Comments

Words of length n in language defined by L = 1 + a + (L)L: L(0)=1, L(1)=a, L(2)=(), L(3)=(a)+()a, L(4)=(())+(a)a+()(), ...
Series reversion of x*A(x) is x*A082582(-x). - Michael Somos, Jul 22 2003
a(n) = number of Motzkin n-paths (A001006) in which no flatstep (F) is immediately followed by either an upstep (U) or a flatstep, in other words, each flatstep is either followed by a downstep (D) or ends the path. For example, a(4)=3 counts UDUD, UFDF, UUDD. - David Callan, Jun 07 2006
a(n) = number of Dyck (n+1)-paths (A000108) containing no UDUs and no subpaths of the form UUPDD where P is a nonempty Dyck path. For example, a(4)=3 counts UUUDDUUDDD, UUDDUUDDUD, UUUDDUDDUD. - David Callan, Sep 25 2006
Given an integer t >= 1 and initial values u = [a_0, a_1, ..., a_{t-1}], we may define an infinite sequence Phi(u) by setting a_n = a_0*a_{n-1} + a_1*a_{n-2} + ... + a_{n-1}*a_0 for n >= t. For example phi([1]) is the Catalan numbers A000108. The present sequence is (essentially) phi([0,1,1]). - Gary W. Adamson and R. J. Mathar, Oct 27 2008
The Kn21(n) triangle sums of A175136 lead to A007477(n+1), while the Kn22(n) = A007477(n+3)-1, Kn23(n) = A007477(n+5)-(4+n) and Kn3(n) = A007477(2*n+1) triangle sums of A175136 are related to the sequence given above. For the definition of these triangle sums see A180662. - Johannes W. Meijer, May 06 2011
For n>=2, a(n) gives number of possible, ways to parse an English sentence consisting of just n+1 copies of word "buffalo", with one particular "plausible" grammar. See the Wikipedia page and my Python source at OEIS Wiki. Whether these are really intelligible sentences is of course debatable. See A213705 for a more plausible example in the Finnish language. - Antti Karttunen, Sep 14 2012

References

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

Crossrefs

Programs

  • Haskell
    a007477 n = a007477_list !! n
    a007477_list = 1 : 1 : f [1,1] where
       f xs = y : f (y:xs) where y = sum $ zipWith (*) (tail xs) (reverse xs)
    -- Reinhard Zumkeller, Apr 09 2012
    
  • Maple
    A007477 := proc(n) option remember; local k; if n <= 1 then 1 else add(A007477(k)*A007477(n-k-2),k=0..n-2); fi; end;
    unprotect(phi);
    phi:=proc(t,u,M) local i,a;
    a:=Array(0..M); for i from 0 to t-1 do a[i]:=u[i+1]; od:
    for i from t to M do a[i]:=add(a[j]*a[i-1-j],j=0..i-1); od:
    [seq(a[i],i=0..M)]; end;
    phi(3,[0,1,1],30);
    # N. J. A. Sloane, Nov 02 2008
  • Mathematica
    f[x_] := (1 - Sqrt[1 - 4x^2 - 4x^3])/2; Drop[ CoefficientList[ Series[f[x], {x, 0, 32}], x], 2] (* Jean-François Alcover, Nov 22 2011, after Pari *)
    a[n_] := Sum[Binomial[2*k+2, n-k-2]*Binomial[n-k-2, k]/(k+1), {k, 0, n-2}]; a[0] = a[1] = 1; Array[a, 40, 0] (* Jean-François Alcover, Mar 04 2016, after Vladimir Kruchinin *)
  • Maxima
    a(n):=if n<2 then 1 else sum((binomial(2*k+2,n-k-2)*binomial(n-k-2,k))/(k+1),k,0,n-2); /* Vladimir Kruchinin, Nov 22 2014 */
  • PARI
    a(n)=polcoeff((1-sqrt(1-4*x^2-4*x^3+x^3*O(x^n)))/2,n+2)
    

Formula

a(n) = sum( a(k) * a(n-2-k) ), n>1.
G.f. A(x) satisfies the equation 0 = 1 + x - A(x) + (x*A(x))^2.
The g.f. satisfies A(x)-x^2*A(x)^2 = 1+x. - Ralf Stephan, Jun 30 2003
G.f.: (1-sqrt(1-4x^2-4x^3))/(2x^2).
G.f.: (1+x)c(x^2(1+x)) where c(x) is g.f. of A000108. - Paul Barry, May 31 2006
G.f.: 1/(1-x/(1-x^2/(1-x^2/(1-x/(1-x^2/(1-x^2/(1-x/(1-x^2/(1-x^2/(1-... (continued fraction). - Paul Barry, Jul 30 2010
D-finite with recurrence: (n+2)*a(n) +(n+1)*a(n-1) +4*(-n+1)*a(n-2) +2*(-4*n+9)*a(n-3) +2*(-2*n+7)*a(n-4)=0. - R. J. Mathar, Dec 02 2012
a(n) = Sum_{k=0..n-2} binomial(2*k+2,n-k-2)*binomial(n-k-2,k)/(k+1), n>1, a(0)=1, a(1)=1. - Vladimir Kruchinin, Nov 22 2014
a(n) = Sum_{k=0..n-1} (-1)^(n-1-k)*binomial(n-1,k)*A082582(k+2), for n>0. - Thomas Baruchel, Jan 22 2015
a(n) ~ sqrt(3 - 4*r^2) * (4*r)^n * (1+r)^(n+1) / (sqrt(Pi)*n^(3/2)), where r = 0.41964337760708056627592628232664330021208937304879612338939... is the root of the equation 4*r^2*(1+r) = 1. - Vaclav Kotesovec, Jul 03 2021

Extensions

Additional comments from Michael Somos, Aug 03 2000

A243753 Number A(n,k) of Dyck paths of semilength n avoiding the consecutive step pattern given by the binary expansion of k, where 1=U=(1,1) and 0=D=(1,-1); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 2, 1, 4, 1, 1, 0, 0, 0, 1, 1, 2, 4, 1, 9, 1, 1, 0, 0, 0, 1, 1, 2, 4, 9, 1, 21, 1, 1, 0, 0, 0, 1, 1, 1, 4, 9, 21, 1, 51, 1, 1, 0, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Jun 09 2014

Keywords

Examples

			Square array A(n,k) begins:
  1, 1, 1, 1, 1,   1, 1,   1,   1,    1, ...
  0, 0, 0, 1, 1,   1, 1,   1,   1,    1, ...
  0, 0, 0, 1, 1,   1, 1,   2,   2,    2, ...
  0, 0, 0, 1, 1,   2, 1,   4,   4,    4, ...
  0, 0, 0, 1, 1,   4, 1,   9,   9,    9, ...
  0, 0, 0, 1, 1,   9, 1,  21,  21,   23, ...
  0, 0, 0, 1, 1,  21, 1,  51,  51,   63, ...
  0, 0, 0, 1, 1,  51, 1, 127, 127,  178, ...
  0, 0, 0, 1, 1, 127, 1, 323, 323,  514, ...
  0, 0, 0, 1, 1, 323, 1, 835, 835, 1515, ...
		

Crossrefs

Columns give: 0, 1, 2: A000007, 3, 4, 6: A000012, 5: A001006(n-1) for n>0, 7, 8, 14: A001006, 9: A135307, 10: A078481 for n>0, 11, 13: A105633(n-1) for n>0, 12: A082582, 15, 16: A036765, 19, 27: A114465, 20, 24, 26: A157003, 21: A247333, 25: A187256(n-1) for n>0.
Main diagonal gives A243754 or column k=0 of A243752.

Programs

  • Maple
    A:= proc(n, k) option remember; local b, m, r, h;
          if k<2 then return `if`(n=0, 1, 0) fi;
          m:= iquo(k, 2, 'r'); h:= 2^ilog2(k); b:=
          proc(x, y, t) option remember; `if`(y<0 or y>x, 0, `if`(x=0, 1,
            `if`(t=m and r=1, 0, b(x-1, y+1, irem(2*t+1, h)))+
            `if`(t=m and r=0, 0, b(x-1, y-1, irem(2*t, h)))))
          end; forget(b);
          b(2*n, 0, 0)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    A[n_, k_] := A[n, k] = Module[{b, m, r, h}, If[k<2, Return[If[n == 0, 1, 0]]]; {m, r} = QuotientRemainder[k, 2]; h = 2^Floor[Log[2, k]]; b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x == 0, 1, If[t == m && r == 1, 0, b[x-1, y+1, Mod[2*t+1, h]]] + If[t == m && r == 0, 0, b[x-1, y-1, Mod[2*t, h]]]]]; b[2*n, 0, 0]]; Table[ Table[A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Jan 27 2015, after Alois P. Heinz *)

A105633 Row sums of triangle A105632.

Original entry on oeis.org

1, 2, 4, 9, 22, 57, 154, 429, 1223, 3550, 10455, 31160, 93802, 284789, 871008, 2681019, 8298933, 25817396, 80674902, 253106837, 796968056, 2517706037, 7977573203, 25347126630, 80738862085, 257778971504, 824798533933
Offset: 0

Views

Author

Paul D. Hanna, Apr 17 2005

Keywords

Comments

Binomial transform of A007477. INVERT transform of A082582. First differences give A086581 and A025242 (offset 1). Is this sequence equal to A057580?
a(n) = the number of Dyck paths of semilength n+1 avoiding UUDU. a(n) = the number of Dyck paths of semilength n+1 avoiding UDUU = the number of binary trees without zigzag (i.e., with no node with a father, with a right son and with no left son). This sequence is the first column of the triangle A116424. E.g., a(2) = 4 because there exist four Dyck paths of semilength 3 that avoid UUDU: UDUDUD, UDUUDD, UUDDUD, UUUDDD, as well as four Dyck paths of semilength 3 that avoid UDUU: UDUDUD, UUDUDD, UUDDUD, UUUDDD. - I. Tasoulas (jtas(AT)unipi.gr), Feb 15 2006
The sequence beginning 1,1,2,4,9,... gives the diagonal sums of A130749, and has g.f. 1/(1-x-x^2/(1-x/(1-x-x^2/(1-x/(1-x-x^2/(1-... (continued fraction); and general term Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} binomial(n-k,j)*A090181(j,k). Its Hankel transform is A099443(n+1). - Paul Barry, Jun 30 2009
The number of plain lambda terms presented by de Bruijn indices, see Bendkowski et al. - Kellen Myers, Jun 15 2015
a(n) = the number of Dyck paths of semilength n+1 with no pairs of
consecutive valleys at the same height. Sergi Elizalde, Feb 25 2021

Examples

			G.f.: A(x) = 1 + 2*x + 4*x^2 + 9*x^3 + 22*x^4 + 57*x^5 + 154*x^6 + 429*x^7 + ...
with A(x)^2 = 1 + 4*x + 12*x^2 + 34*x^3 + 96*x^4 + 274*x^5 + 793*x^6 + ...
where A(x) = 1 + x*(2-x)*A(x) + x^2*(1-x)*A(x)^2.
The logarithm of the g.f. begins:
log(A(x)) = (1 + (1-x))*x + (1 + 2^2*(1-x) + (1-x)^2)*x^2/2 +
(1 + 3^2*(1-x) + 3^2*(1-x)^2 + (1-x)^3)*x^3/3 +
(1 + 4^2*(1-x) + 6^2*(1-x)^2 + 4^2*(1-x)^3 + (1-x)^4)*x^4/4 +
(1 + 5^2*(1-x) + 10^2*(1-x)^2 + 10^2*(1-x)^3 + 5^2*(1-x)^4 + (1-x)^5)*x^5/5 + ...
Explicitly,
log(A(x)) = 2*x + 4*x^2/2 + 11*x^3/3 + 32*x^4/4 + 97*x^5/5 + 301*x^6/6 + 947*x^7/7 + 3008*x^8/8 + 9623*x^9/9 + 30959*x^10/10 + ...
		

Crossrefs

Programs

  • Maple
    a := n -> add((-1)^i*hypergeom([(i+1)/2, i/2+1, i-n-1], [1, 2], -4), i=0..n+1):
    seq(simplify(a(n)), n=0..26); # Peter Luschny, May 03 2018
  • Mathematica
    CoefficientList[Series[(1 - x - Sqrt[(1 - x)^2 - 4 x^2/(1 - x)])/(2 x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 15 2014 *)
  • PARI
    {a(n)=local(X=x+x*O(x^n)); polcoeff(2/(1-X)/(1-X+sqrt((1-X)^2-4*X^2/(1-X))),n,x)}
    
  • PARI
    {a(n)=polcoeff(exp(sum(m=1,n+1,x^m/m*sum(k=0,m,binomial(m,k)^2*(1-x)^(m-k) + x*O(x^n)))),n)} \\ Paul D. Hanna, Sep 12 2012

Formula

G.f.: A(x) = (1-x - sqrt((1-x)^2 - 4*x^2/(1-x)))/(2*x^2).
a(n) = 2*a(n-1) + Sum_{i=1..n-2} a(i)*(a(n-1-i) - a(n-2-i)). a(n) = Sum_{i=0..floor(n/2)} (-1)^i * binomial(n+1-i,i) * binomial(2*(n+1)-3*i, n-2*i) /(n+1-i). - I. Tasoulas (jtas(AT)unipi.gr), Feb 15 2006
G.f.: (1/(1-x)^2)c(x^2/(1-x)^3), where c(x) is the g.f. of A000108. - Paul Barry, May 22 2009
1/(1-x-x/(1-x^2/(1-x-x/(1-x^2/(1-x-x/(1-x^2/(1-... (continued fraction). - Paul Barry, Jun 30 2009
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} binomial(n-k,j)(0^(j+k)+(1/(j+0^j))*binomial(j,k)*binomial(j,k+1)). - Paul Barry, Jun 30 2009
G.f. satisfies: A(x) = (1 + x*A(x)) * (1 + x*(1-x)*A(x)). - Paul D. Hanna, Sep 12 2012
G.f.: exp( Sum_{n>=1} x^n/n * Sum_{k=0..n} binomial(n,k)^2 * (1-x)^k ). - Paul D. Hanna, Sep 12 2012
D-finite with recurrence: (n+2)*a(n) + (-4*n-3)*a(n-1) + (2*n+1)*a(n-2) + a(n-3) + (n-3)*a(n-4) = 0. - R. J. Mathar, Nov 26 2012
The recurrence is true, since by holonomic transformation, it can be computed formally using GFUN, associated with the equation: x^3 + x^2 - 2x + (x^3 + 3 x^2 -3x +1) A(x) + (x^5 + 2x^3 -4 x^2 + x) A'(x) = 0. - Pierre Lescanne, Jun 30 2015
G.f.: (1 - 1/(G(0)-x))/x^2 where G(k) = 1 + x/(1 + x/(x^2 - 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 16 2012
a(n) ~ 2^(n/3-1/6) * 3^(n+2) * (13+3*sqrt(33))^((n+1)/3) * sqrt(4*(2879 + 561*sqrt(33))^(1/3) + 8*(7822 + 1362*sqrt(33))^(1/3) - 91 - 21*sqrt(33)) / (((26+6*sqrt(33))^(2/3) - (26+6*sqrt(33))^(1/3) - 8)^(n+3/2) * (4*(26+6*sqrt(33))^(1/3) - (26+6*sqrt(33))^(2/3) + 8) * n^(3/2) * sqrt(Pi)). - Vaclav Kotesovec, Mar 13 2014
a(n) = Sum_{i=0..n+1} (-1)^i*hypergeom([(i+1)/2, i/2+1, i-n-1], [1, 2], -4). - Peter Luschny, May 03 2018

Extensions

More terms from I. Tasoulas (jtas(AT)unipi.gr), Feb 15 2006

A086581 Number of Dyck paths of semilength n with no DDUU.

Original entry on oeis.org

1, 1, 2, 5, 13, 35, 97, 275, 794, 2327, 6905, 20705, 62642, 190987, 586219, 1810011, 5617914, 17518463, 54857506, 172431935, 543861219, 1720737981, 5459867166, 17369553427, 55391735455, 177040109419, 567019562429, 1819536774089
Offset: 0

Views

Author

Michael Somos, Jul 22 2003

Keywords

Comments

See A025242 for a bijection between paths avoiding UUDD versus DDUU.
Number of lattice paths, never going below the x-axis, from (0,0) to (n,0) consisting of up steps U(k) = (k,1) for every positive integer k, down steps D = (1,-1) and horizontal steps H. - José Luis Ramírez Ramírez, Apr 19 2015
Given a sequence variant with 0 inserted between the two 1's, the INVERT transform of the modified sequence is this sequence. - Gary W. Adamson, Jun 28 2015

Examples

			a(4) = 13 because of the 14 Dyck 4-paths only UUDDUUDD contains DDUU.
		

Crossrefs

Column k=0 of A114492.

Programs

  • Maple
    F:= gfun:-rectoproc({(n+2)*a(n) +(n+3)*a(n-1) +2*(-9*n+4)*a(n-2) +10*(n-2)*a(n-3) +(n-4)*a(n-4) +5*(n-5)*a(n-5)=0, seq(a(n)=[1,1,2,5,13][n+1],n=0..4)},a(n),remember):
    map(F, [$0..30]); # Robert Israel, Jun 29 2015
  • Mathematica
    CoefficientList[ Series[(1 - 2 x + x^2 - Sqrt[1 - 4 x + 2 x^2 + x^4])/(2 x^2), {x, 0, 27}], x] (* Robert G. Wilson v, Mar 25 2011 *)
  • PARI
    {a(n) = polcoeff((1 - 2*x + x^2 - sqrt(1 - 4*x + 2*x^2 + x^4 + x^3 * O(x^n))) / 2, n+2)}
    
  • PARI
    a(n)=1+sum(k=0,n,sum(i=0,k,binomial(n-1,k)*binomial(2*i+2,i)*binomial(i+2,k-2*i-1)/(i+1))) \\ Thomas Baruchel, Jan 19 2015

Formula

G.f. A(x) satisfies the equation 0 = 1 - x - (1 - x)^2 * A(x) + (x * A(x))^2.
a(n) = A025242(n+1) = A082582(n+1).
G.f.: (1 - 2*x + x^2 - sqrt(1 - 4*x + 2*x^2 + x^4)) /(2 * x^2).
a(n+2) - 2*a(n+1) + a(n) = a(0)*a(n) + a(1)*a(n-1) + ... + a(n)*a(0).
G.f.: (1/(1-x))*c(x^2/(1-x)^3), c(x) the g.f. of A000108; a(n)=sum{k=0..floor(n/2), C(n+k,3k)*A000108(k)}. - Paul Barry, May 31 2006
Conjecture: (n+2)*a(n) +(n+3)*a(n-1) +2*(-9*n+4)*a(n-2) +10*(n-2)*a(n-3) +(n-4)*a(n-4) +5*(n-5)*a(n-5)=0. - R. J. Mathar, Nov 26 2012
G.f. satisfies (10*x^3-28*x^2+4*x+2)*A(x) + (5*x^6+x^5+10*x^4-18*x^3+x^2+x)*A'(x) = 5*x^4+x^3-15*x^2+7*x+2. This confirms R. J. Mathar's recurrence equation. - Robert Israel, Jun 29 2015
G.f.: 1 - G(0), where G(k)= 1 - 1/(1 - x/(1 - x/(1 - x/(1 - x/(x - 1/G(k+1) ))))); (continued fraction). - Sergei N. Gladkovskii, Jul 12 2013
G.f.: 1/G(0) where G(k) = 1 - q/(1 - q - q^2 / G(k+1) ); (continued fraction). - Joerg Arndt, Feb 27 2014
From Thomas Baruchel, Jan 19 2015: (Start)
a(n) = 1+Sum_{k=0..n} Sum_{i=0..k} C(n-1,k)*C(2i+2,i)*C(i+2,k-2i-1)/(i+1).
a(n) = Sum_{k=0..n} C(2k,k)*C(n+k,3k)/(k+1).
Sum_{k=0..n} a(k+1)*A108626(n-k) = Sum_{k=0..n} Sum_{i=0..k} binomial(n-k+1,i-1)*binomial(n-k+1,i)*binomial(n-i+1,k-i). (End)

Extensions

Name corrected by David Scambler, Mar 28 2011

A023432 Number of Dyck n-paths with ascents and descents of length equal to 1 (mod 3).

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 7, 12, 22, 42, 80, 152, 292, 568, 1112, 2185, 4313, 8557, 17050, 34089, 68370, 137542, 277475, 561185, 1137595, 2311014, 4704235, 9593662, 19598920, 40103635, 82185653, 168666493, 346613232, 713200114, 1469254621, 3030218948, 6256281188
Offset: 0

Views

Author

Keywords

Comments

Number of Motzkin paths of length n-1 with no peaks, no double rises and no doubledescents (i.e., no UD's, no UU's and no DD's, where U=(1,1) and D=(1,-1), n>0; can be easily formulated using RNA secondary structure terminology). E.g., a(5)=4 because we have HHHH, HUHD, UHDH and UHHD; here H=(1,0). Also number of peakless Motzkin paths of length n in which each D=(1,-1) step is followed by an H=(1,0) step (can be easily formulated using RNA secondary structure terminology). E.g., a(5)=4 because we have HHHHH, HUHDH, UHDHH and UHHDH (here U=(1,1)). - Emeric Deutsch, Jan 09 2004
The coefficient of t^n in the power series expansion of the solution u in the equation (1-t*u)(u-t*u-t-t^2*u^2+t^3*u)=0. - Shanzhen Gao, May 13 2011
Also the number of Dyck n-paths all of whose ascents and descents have lengths equal to 1 (mod 3). The a(5) = 4 paths for n=5 are: UDUDUDUDUD, UUUUDDDDUD, UUUUDUDDDD, UDUUUUDDDD. - Alois P. Heinz, May 09 2012
a(n)=number of strictly alternating bargraphs of semiperimeter n+2. A bargraph is said to be strictly alternating if its ascents and descents alternate and all the formed peaks and valleys have width 1. An ascent (descent) is a maximal sequence of consecutive U (D) steps. Example: a(4) = 2 because among the 35 (=A082582(6)) bargraphs of semiperimeter 6 only those corresponding to the compositions [5] and [2,1,2] are strictly alternating. - Emeric Deutsch, Aug 26 2016
For n>=1, a(n) is the number of Dyck paths of semilength n+2 in which all ascent and descent lengths are >=3. For example, a(4) = 2 counts U^6.D^6, U^3.D^3.U^3.D^3 where ^ denotes repetition and a dot denotes concatenation. The gf F(x) = 1 + x^3 + x^4 + x^5 + 2*x^6 + ... for these paths satisfies F = 1 + x^3/(1-x) + (F-1)x^3/((1-x)(1-x*F)), which follows from a first return decomposition and summing over the lengths of the first ascent and first descent. A bijection to the title paths would be interesting. - David Callan, Dec 07 2021

Examples

			G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 4*x^4 + 7*x^5 + 12*x^6 + 22*x^7 +...
where the logarithm of the g.f. equals the series:
log(A(x)) = (1 + x^2)*x + (1 + 2^2*x^2 + x^4)*x^2/2 + (1 + 3^2*x^2 + 3^2*x^4 + x^6)*x^3/3 + (1 + 4^2*x^2 + 6^2*x^4 + 4^2*x^6 + x^8)*x^4/4 + (1 + 5^2*x^2 + 10^2*x^4 + 10^2*x^6 + 5^2*x^8 + x^10)*x^5/5 + ... - _Paul D. Hanna_
		

Crossrefs

Programs

  • Haskell
    a023432 n = a023432_list !! n
    a023432_list = 1 : 1 : f [1,1] where
       f xs'@(x:_:xs) = y : f (y : xs') where
         y = x + sum (zipWith (*) xs $ reverse $ tail xs)
    -- Reinhard Zumkeller, Nov 13 2012
    
  • Maple
    a:= proc(n) option remember;
          `if`(n=0, 1, a(n-1) +add(a(k)*a(n-3-k), k=1..n-3))
        end:
    seq(a(n), n=0..50); # Alois P. Heinz, May 09 2012
  • Mathematica
    Clear[ a ]; a[ 0 ]=1; a[ n_Integer ] := a[ n ]=a[ n-1 ]+Sum[ a[ k ]*a[ n-3-k ], {k, 0, n-4} ];
    CoefficientList[Series[(1-x+x^3-Sqrt[1-2*x-2*x^3+x^2-2*x^4+x^6])/(2*x^3), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 22 2014 *)
  • Maxima
    a(n):=if n=0 then 1 else sum(binomial(n-2*q,q)*binomial(n-2*q,q+1)/(n-2*q),q,0,(n-1)/2); /* Vladimir Kruchinin, Jan 21 2019 */
  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=(1+x*A)*(1+x^3*A +x*O(x^n)));polcoeff(A, n)} /* Paul D. Hanna */
    
  • PARI
    {a(n)=polcoeff( exp(sum(m=1, n+1, x^m/m*sum(j=0, m, binomial(m, j)^2*x^(2*j))+x*O(x^n))), n)} /* Paul D. Hanna */
    
  • PARI
    {a(n)=local(A=1+x); for(i=1, n, A=exp(sum(m=1, n, (1-x^2)^(2*m+1)*sum(j=0, n\2, binomial(m+j, j)^2*x^(2*j))*x^m/m)+x*O(x^n))); polcoeff(A, n, x)} /* Paul D. Hanna */
    

Formula

G.f.: (1-z+z^3-sqrt(1-2z-2z^3+z^2-2z^4+z^6))/(2z^3). - Emeric Deutsch, Jan 09 2004
G.f.: 1/(1-x-x^4/(1-x-x^3-x^4/(1-x-x^3-x^4/(1-x-x^3-x^4/(1-... (continued fraction). - Paul Barry, May 22 2009
G.f.: 1/(1-x/(1-x^3/(1-x/(1-x^3/(1-x/(1-x^3/(1-... (continued fraction). - Paul Barry, Nov 30 2009
From Paul D. Hanna, Nov 01 2011: (Start)
G.f. (for offset -1) satisfies: A(x) = (1 + x*A(x))*(1 + x^3*A(x)).
G.f.: A(x) = exp( Sum_{n>=1} x^n/n * Sum_{k=0..n} C(n,k)^2 * x^(2*k) ).
G.f.: A(x) = exp( Sum_{n>=1} x^n/n * (1-x^2)^(2*n+1) * Sum_{k>=0} C(n+k,k)^2 * x^(2*k) ). (End)
a(n) ~ sqrt(3-5*r+2*r^2-3*r^3-2*r^4) / (2*sqrt(2*Pi)*n^(3/2)*r^(n+3)), where r = 0.465571231876768... is the root of the equation 1+r^2+r^6 = 2*r*(1+r^2+r^3). - Vaclav Kotesovec, Mar 22 2014
a(n) = Sum_{k=0..(n-1)/2} C(n-2*k,k)*C(n-2*k,k+1)/(n-2*k), n>0, a(0)=1. - Vladimir Kruchinin, Jan 21 2019
D-finite with recurrence (n+3)*a(n) +(-2*n-3)*a(n-1) +n*a(n-2) +(-2*n+3)*a(n-3) +2*(-n+3)*a(n-4) +(n-6)*a(n-6)=0. - R. J. Mathar, Jul 23 2023

Extensions

New name, using a comment of Alois P. Heinz, from Peter Luschny, Jan 21 2019

A025242 Generalized Catalan numbers A(x)^2 -(1+x)^2*A(x) +x*(2+x+x^2) =0.

Original entry on oeis.org

2, 1, 1, 2, 5, 13, 35, 97, 275, 794, 2327, 6905, 20705, 62642, 190987, 586219, 1810011, 5617914, 17518463, 54857506, 172431935, 543861219, 1720737981, 5459867166, 17369553427, 55391735455, 177040109419, 567019562429, 1819536774089
Offset: 1

Views

Author

Keywords

Comments

Number of Dyck paths of semilength n-1 with no UUDD (n>1). Example: a(4)=2 because the only Dyck paths of semilength 3 with no UUDD in them are UDUDUD and UUDUDD (the nonqualifying ones being UDUUDD, UUDDUD and UUUDDD). - Emeric Deutsch, Jan 27 2003
a(n) is the number of Dyck (n-2)-paths with no DDUU (n>2). Example: a(6)=13 counts all 14 Dyck 4-paths except UUDDUUDD which contains a DDUU. There is a simple bijective proof: given a Dyck path that avoids DDUU, for every occurrence of UUDD except the first, the ascent containing this UU must be immediately preceded by a UD (else a DDUU would be present). Transfer the latter UD to the middle of the DD in the UUDD. Then insert a new UD in the middle of the first DD if any; if not, the path is a sawtooth UDUD...UD, in which case insert a UD at the end. This is a bijection from DDUU-avoiding Dyck n-paths to UUDD-avoiding Dyck (n+1)-paths. - David Callan, Sep 25 2006
For n>1, a(n) is the number of cyclic permutations of [n-1] that avoid the vincular pattern 13-4-2, i.e., the pattern 1342 where the 1 and 3 must be adjacent. By the trivial Wilf equivalence, the same applies for 24-3-1, 31-2-4, and 42-1-3. - Rupert Li, Jul 27 2021

Crossrefs

Programs

  • Mathematica
    a[ 0 ]=1; a[ n_Integer ] := a[ n ]=a[ n-1 ]+Sum[ a[ k ]*a[ n-1-k ], {k, 2, n-1} ];
  • PARI
    a(n)=polcoeff((1+2*x+x^2-sqrt(1-4*x+2*x^2+x^4+x*O(x^n)))/2,n)

Formula

a(n) = a(1)*a(n-1) + a(2)*a(n-2) + ... + a(n-3)*a(3) for n >= 4.
G.f.: (1+2*x+x^2-sqrt(1-4*x+2*x^2+x^4))/2. - Michael Somos, Jun 08 2000
Conjecture: n*(n+1)*a(n) +(n^2+n+2)*a(n-1) +2*(-9*n^2+15*n+17)*a(n-2) +2*(5*n+4)*(n-4)*a(n-3) +(n+1)*(n-6)*a(n-4) +(5*n+4)*(n-7)*a(n-5)=0. - R. J. Mathar, Jan 12 2013
G.f.: 2 + x - x*G(0), where G(k) = 1 - 1/(1 - x/(1 - x/(1 - x/(1 - x/(x - 1/G(k+1) ))))); (continued fraction). - Sergei N. Gladkovskii, Jul 12 2013

A273720 Number of horizontal steps in the peaks of all bargraphs having semiperimeter n (n>=2).

Original entry on oeis.org

1, 3, 8, 21, 57, 162, 479, 1458, 4528, 14259, 45349, 145289, 468121, 1515128, 4922145, 16040310, 52411294, 171646085, 563266323, 1851661113, 6096654978, 20101681834, 66362538332, 219336702948, 725692113292, 2403295565913, 7966021263923, 26425616887971
Offset: 2

Views

Author

Emeric Deutsch, Jun 01 2016

Keywords

Examples

			a(4) = 8 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and the corresponding drawings show that they have 3,1,1,2,1 horizontal steps in their peaks.
		

Crossrefs

Programs

  • Maple
    g := (1/2)*z^2*(1-2*z+2*z^2-2*z^3+z^4+Q)/((1-z)^2*Q): Q := sqrt((1-z)^5*(1-3*z-z^2-z^3)): gser := series(g, z = 0, 35): seq(coeff(gser, z, n), n = 2 .. 32);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<6, [0$2, 1, 3, 8, 21][n+1],
         ((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2)
          +(2*(101-58*n+8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4)
          +(2*(n-6))*(2*n-5)*a(n-5)-(n-6)*(2*n-5)*a(n-6))/
          ((n-2)*(2*n-9)))
        end:
    seq(a(n), n=2..40);  # Alois P. Heinz, Jun 01 2016
  • Mathematica
    a[n_] := a[n] = If[n<6, {0, 0, 1, 3, 8, 21}[[n+1]], ((2*(3*n-7))*(2*n - 9)*a[n-1] - (254 - 155*n + 22*n^2)*a[n-2] + (2*(101 - 58*n + 8*n^2))*a[n - 3] - (86 - 47*n + 6*n^2)*a[n-4] + (2*(n-6))*(2*n - 5)*a[n-5] - (n-6)*(2*n - 5)*a[n-6])/((n-2)*(2*n - 9))]; Table[a[n], {n, 2, 40}] (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)

Formula

G.f.: g(z) = z^2*(1-2*z+2*z^2-2*z^3+z^4+Q)/(2*Q*(1-z)^2), where Q = sqrt((1-z)^5*(1-3*z-z^2-z^3)).
a(n) = Sum(k*A273719(n,k), k>=1).
a(n) = ((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2) +(2*(101 -58*n +8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4) +(2*(n-6))*(2*n-5)*a(n-5) -(n-6)*(2*n-5)*a(n-6))/((n-2)*(2*n-9)) for n>=6. - Alois P. Heinz, Jun 01 2016

A291843 Triangle T(n,k) read by rows: coefficients of polynomials P_n(t) defined in Formula section.

Original entry on oeis.org

1, 0, 1, 5, 3, 36, 33, 2, 329, 388, 72, 3655, 5101, 1545, 64, 47844, 75444, 30700, 3023, 20, 721315, 1248911, 621937, 97200, 3134, 12310199, 22964112, 13269140, 2793713, 180936, 1656, 234615096, 465344235, 301698501, 78495574, 7733807, 205620, 352, 4939227215, 10316541393, 7336995966, 2239771686, 293933437, 13977294, 140660
Offset: 0

Views

Author

Gheorghe Coserea, Oct 23 2017

Keywords

Comments

Row n > 0 contains floor((2*n+1)/3) terms.

Examples

			A(x;t) = 1 + x^2 + (5 + 3*t)*x^3 + (36 + 33*t + 2*t^2)*x^4 + ...
Triangle starts:
n\k  [0]        [1]        [2]        [3]       [4]      [5]     [6]
[0]  1;
[1]  0;
[2]  1;
[3]  5,         3;
[4]  36,        33,        2;
[5]  329,       388,       72;
[6]  3655,      5101,      1545,      64;
[7]  47844,     75444,     30700,     3023,     20;
[8]  721315,    1248911,   621937,    97200,    3134;
[9]  12310199,  22964112,  13269140,  2793713,  180936,  1656;
[10] 234615096, 465344235, 301698501, 78495574, 7733807, 205620, 352;
[11] ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 11; Clear[Z, Zp]; Z[_] = 0;
    Do[
    Zp[t_] = Z'[t] + O[t]^n // Normal;
    Z[t_] = (-(1/(2L t (1+t)))) (-1 + t - 2L t + 2L^2 t^4 (1 + Zp[t]) + t^2 (1 + 2L + 2L Zp[t]) + L t^3 (3 + 2L + 2(1+L) Zp[t]) + Sqrt[4L t (1+t) (1 + L t)(-1 + t + 2L t^2 + 2(-1 + L) t^2 Zp[t]) + (-1 + t (1 + t + L (-2 + t (2 + t (3 + 2L (1+t))))) + 2L t^2 (1+t)(1 + L t) Zp[t])^2]) + O[t]^n // Normal // Simplify,
    {n, nmax+1}];
    CoefficientList[#, L]& /@ CoefficientList[Z[t], t] /. {} -> {0} // Flatten (* Jean-François Alcover, Oct 23 2018 *)
  • PARI
    A291843_ser(N, t='t) = {
      my(x='x+O('x^N), y=1, y1=0, n=1,
      dn = 1/(-2*t^2*x^4 - (2*t^2+3*t)*x^3 - (2*t+1)*x^2 + (2*t-1)*x + 1));
      while (n++,
       y1 = (2*x^2*y'*((-t^2 + t)*x + (-t + 1) + (t^2*x^2 + (t^2 + t)*x + t)*y) +
            (t*x^2 + t*x)*y^2 - (2*t^2*x^3 + 3*t*x^2 + (-t + 1)*x - 1))*dn;
       if (y1 == y, break); y = y1;); y;
    };
    concat(apply(p->if(p === Pol(0,'t), [0], Vecrev(p)), Vec(A291843_ser(12))))
    \\ test: y=A291843_ser(56); 2*x^2*deriv(y,x) == (1-x-2*t*x^2)*((1+x)*y-1)/(1-t + t*(1+x)*y) - y*x/(1+t*x)

Formula

y(x;t) = Sum_{n>=0} P_n(t)*x^n satisfies 2*x^2*deriv(y,x) = (1-x-2*t*x^2)*((1+x)*y-1)/(1-t + t*(1+x)*y) - y*x/(1+t*x), with y(0;t)=1, where P_n(t) = Sum_{k=0..floor((2*n-2)/3)} T(n,k)*t^k for n > 0. (see eqn. (24) in Molinari link)
A278990(n) = P_n(0), A294166(n) = P_n(1), A082582(n) = P_n(-1) for n > 1.
A267827(n) = T(3*n+1, 2*n), n > 0. - Danny Rorabaugh, Nov 10 2017

A218321 Number of lattice paths from (0,0) to (n,n) which do not go above the diagonal x=y using steps (1,k), (k,1) with k>=0.

Original entry on oeis.org

1, 2, 8, 39, 212, 1230, 7458, 46689, 299463, 1957723, 12996879, 87383754, 593794311, 4071599216, 28136612051, 195756911831, 1370068168916, 9639404836227, 68138551870047, 483682445360748, 3446462104490724, 24642148415136556, 176743014104068411
Offset: 0

Views

Author

Alois P. Heinz, Oct 25 2012

Keywords

Examples

			a(2) = 8: [(0,0),(1,0),(1,1),(2,1),(2,2)], [(0,0),(1,0),(1,1),(2,2)], [(0,0),(1,0),(2,0),(2,1),(2,2)], [(0,0),(1,0),(2,1),(2,2)], [(0,0),(1,0),(2,2)], [(0,0),(1,1),(2,1),(2,2)], [(0,0),(1,1),(2,2)], [(0,0),(2,1),(2,2)].
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y<0 or y>x, 0, `if`(x=0, 1,
          add(b(x-i, y-1), i=0..x) +add(b(x-1, y-j), j=0..y) -b(x-1,y-1)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..30);
    # second Maple program gives series:
    series(RootOf(x^4*T^4-(x^2+1)*x^2*T^3-(x^2-2*x-2)*x*T^2-(x^2+1)*T+1, T), x=0, 31);  # Mark van Hoeij, Apr 17 2013
  • Mathematica
    b[x_, y_] := b[x, y] = If[y < 0 || y > x, 0, If[x == 0, 1, Sum[b[x - i, y - 1], {i, 0, x}] + Sum[b[x - 1, y - j], {j, 0, y}] - b[x - 1, y - 1]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Sep 01 2022, after Alois P. Heinz *)

Formula

G.f.: (sqrt(x^4+4*x^3+2*x^2-8*x+1)+x^2+1-sqrt(2*(x^4+2*x^3-6*x^2-4*x+1+(x^2+1)*sqrt(x^4+4*x^3+2*x^2-8*x+1))))/(4*x^2). - Mark van Hoeij, Apr 17 2013
Showing 1-10 of 62 results. Next