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

A108063 Triangle, read by rows, where T(n,k) = A006498(n+1) - A106408(n,k). A006498 are the central numbers of A106408.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, -1, 0, -1, 1, 2, -1, 0, 0, -1, 2, 4, -1, 1, 0, 1, -1, 4, 6, -2, 1, 0, 0, 1, -2, 6, 9, -4, 1, -1, 0, -1, 1, -4, 9, 15, -6, 2, -1, 0, 0, -1, 2, -6, 15, 25, -9, 4, -1, 1, 0, 1, -1, 4, -9, 25, 40, -15, 6, -2, 1, 0, 0, 1, -2, 6, -15, 40, 64, -25, 9, -4, 1, -1, 0, -1, 1, -4, 9, -25, 64, 104, -40, 15, -6, 2, -1, 0, 0, -1, 2, -6
Offset: 1

Views

Author

Gerald McGarvey, Jun 02 2005

Keywords

Comments

Each entry is +- an entry in A006498. Each column and each diagonal contains either A006498 or -A006498. For n>2, each row contains an alternating-signed version of a subsequence of A006498, both in forward and reverse order. For n>2 each column contains an alternating-signed version of a contiguous subsequence of A006498 in reverse order.

Crossrefs

A005251 a(0) = 0, a(1) = a(2) = a(3) = 1; thereafter, a(n) = a(n-1) + a(n-2) + a(n-4).

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 7, 12, 21, 37, 65, 114, 200, 351, 616, 1081, 1897, 3329, 5842, 10252, 17991, 31572, 55405, 97229, 170625, 299426, 525456, 922111, 1618192, 2839729, 4983377, 8745217, 15346786, 26931732, 47261895, 82938844, 145547525, 255418101, 448227521
Offset: 0

Views

Author

Keywords

Comments

a(n+3) is the number of n-bit sequences that avoid 010. Example: For n=4 the 12 sequences are all 4-bit sequences except 0100, 0101, 0010, 1010. - David Callan, Mar 25 2004
a(n+2) is the number of compositions (ordered partitions) of n where no two adjacent parts are != 1, see example. - Joerg Arndt, Jan 26 2013
a(n+1) is the number of compositions of n avoiding the part 2. - Joerg Arndt, Jul 13 2014
Number of different positive braids with n crossings of 3 strands.
This is a_2(n) in the Doroslovacki reference. Note that there is a typo in the paper in the formula for a_2(n): the upper bound in the inner sum should be "n-i" not "i-1". - Max Alekseyev, Jun 26 2007
a(n) is the number of peakless Motzkin paths of length n-1 with no UHH...HD's starting at level > 0 (here n > 0 and U=(1,1), H=(1,0), D=(1,-1)). Example: a(5)=7 because from all 8 peakless Motzkin paths of length 5 (see A004148) only UUHDD does not qualify. - Emeric Deutsch, Sep 13 2004
Equals the INVERT transform of (1, 0, 1, 1, 1, ...); equivalent to a(n) = a(n-1) + a(n-3) + a(n-4) + ... - Gary W. Adamson, Apr 27 2009
a(n) is the number of length n-1 words on {0,1} such that each string of 1's is followed by a string of at least two 0's. For example, a(5) = 4 because we have: 0000, 0100, 1000, and 1100. - Geoffrey Critzer, Aug 09 2013
a(n+1) is the top left entry of the n-th power of any of the 3 X 3 matrices [1, 1, 0; 0, 1, 1; 1, 0, 0] or [1, 0, 1; 1, 1, 0; 0, 1, 0] or [1, 1, 0; 0, 0, 1; 1, 0, 1] or [1, 0, 1; 1, 0, 0; 0, 1, 1]. - R. J. Mathar, Feb 03 2014
For n >= 2, a(n) is the number of (n-2)-length binary words with no isolated zeros. - Milan Janjic, Mar 07 2015
Apart from the first three terms, the total number of bargraphs of semiperimeter n of height at most two for n >= 2 starts 1, 2, 4, 7, 12, ... - Arnold Knopfmacher, Nov 02 2016
Number of DD-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are DD-equivalent iff the positions of pattern DD are identical in these paths. - Sergey Kirgizov, Apr 08 2018
From Gus Wiseman, Nov 25 2019: (Start)
For n > 0, also the number of subsets of {1, ..., n - 3} such that if x and x + 2 are both in the subset, then so is x + 1. For example, the a(3) = 1 through a(7) = 12 subsets are:
{} {} {} {} {}
{1} {1} {1} {1}
{2} {2} {2}
{1,2} {3} {3}
{1,2} {4}
{2,3} {1,2}
{1,2,3} {1,4}
{2,3}
{3,4}
{1,2,3}
{2,3,4}
{1,2,3,4}
(End)
The two-dimensional version, which counts sets of pairs where, if two pairs are separated by graph-distance 2, then the intermediate pair or pairs are also in the set, is A329871. - Gus Wiseman, Nov 30 2019
a(n+1) is the number of ways to tile a strip of length n with squares, dominoes, and tetrominoes, where the first tile cannot be a domino. - Greg Dresden and Myanna Nash, Aug 18 2020

Examples

			From _Joerg Arndt_, Jan 26 2013: (Start)
The a(5+2) = 12 compositions of 5 where no two adjacent parts are != 1 are
  [ 1]  [ 1 1 1 1 1 ]
  [ 2]  [ 1 1 1 2 ]
  [ 3]  [ 1 1 2 1 ]
  [ 4]  [ 1 1 3 ]
  [ 5]  [ 1 2 1 1 ]
  [ 6]  [ 1 3 1 ]
  [ 7]  [ 1 4 ]
  [ 8]  [ 2 1 1 1 ]
  [ 9]  [ 2 1 2 ]
  [10]  [ 3 1 1 ]
  [11]  [ 4 1 ]
  [12]  [ 5 ]
(End)
G.f. = x + x^2 + x^3 + 2*x^4 + 4*x^5 + 7*x^6 + 12*x^7 + 21*x^8 + 37*x^9 + ...
		

References

  • S. Burckel, Efficient methods for three strand braids (submitted). [Apparently unpublished]
  • P. Chinn and S. Heubach, "Compositions of n with no occurrence of k", Congressus Numeratium, 2002, v. 162, pp. 33-51.
  • John H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, p. 205.
  • R. K. Guy, "Anyone for Twopins?" in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 2-15.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisection of Padovan sequence A000931.
Partial sums of A005314 shifted 3 times to the right, if we assume A005314(0) = 1.
Compositions without adjacent equal parts are A003242.
Compositions without isolated parts are A114901.
Row sums of A097230(n-2) for n>1.

Programs

  • Haskell
    a005251 n = a005251_list !! n
    a005251_list = 0 : 1 : 1 : 1 : zipWith (+) a005251_list
       (drop 2 $ zipWith (+) a005251_list (tail a005251_list))
    -- Reinhard Zumkeller, Dec 28 2011
    
  • Magma
    I:=[0,1,1,1]; [n le 4 select I[n] else Self(n-1)+Self(n-2)+Self(n-4): n in [1..45]]; // Vincenzo Librandi, Nov 30 2018
    
  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x*(1-x)/(1-2*x + x^2 - x^3) )); // Marius A. Burtea, Oct 24 2019
    
  • Maple
    A005251 := proc(n) option remember; if n <= 2 then n elif n = 3 then 4 else 2*A005251(n - 1) - A005251(n - 2) + A005251(n - 3); fi; end;
    A005251:=(-1+z)/(-1+2*z-z**2+z**3); # Simon Plouffe in his 1992 dissertation
    a := n -> `if`(n<=1, n, hypergeom([(2-n)/3, 1-n/3, (1-n)/3], [1/2, -n+1], 27/4)):
    seq(simplify(a(n)), n=0..36); # Peter Luschny, Apr 08 2018
  • Mathematica
    LinearRecurrence[{2,-1,1},{0,1,1},40]  (* Harvey P. Dale, May 05 2011 *)
    a[ n_]:= If[n<0, SeriesCoefficient[ -x(1-x)/(1 -x + 2x^2 -x^3), {x, 0, -n}], SeriesCoefficient[ x(1-x)/(1 -2x +x^2 -x^3), {x, 0, n}]] (* Michael Somos, Dec 13 2013 *)
    a[0] = 1; a[1] = a[2] = 0; a[n_] := a[n] = a[n-2] + a[n-3]; Table[a[2 n-1], {n, 1, 20}] (* Rigoberto Florez, Oct 15 2019 *)
    Table[If[n==0,0,Length[DeleteCases[Subsets[Range[n-3]],{_,x_,y_,_}/;x+2==y]]],{n,0,10}] (* Gus Wiseman, Nov 25 2019 *)
  • PARI
    Vec((1-x)/(1-2*x+x^2-x^3)+O(x^99)) /* Charles R Greathouse IV, Nov 20 2012 */
    
  • PARI
    {a(n) = if( n<0, polcoeff( -x*(1-x)/(1 -x +2*x^2 -x^3) + x*O(x^-n), -n), polcoeff( x*(1-x)/(1 -2*x +x^2 -x^3) + x*O(x^n), n))} /* Michael Somos, Dec 13 2013 */
    
  • SageMath
    [sum( binomial(n-j-1, 2*j) for j in (0..floor((n-1)/3)) ) for n in (0..50)] # G. C. Greubel, Apr 13 2022

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-3).
G.f.: z*(1-z)/(1 - 2*z + z^2 - z^3). - Emeric Deutsch, Sep 13 2004
23*a_n = 3*P_{2n+1} + 7*P_{2n} - 2*P_{2n-1}, where P_n are the Perrin numbers, A001608. - Don Knuth, Dec 09 2008
a(n+1) = Sum_{k=0..n} binomial(n-k, 2k). - Richard L. Ollerton, May 12 2004
From Henry Bottomley, Feb 21 2001: (Start)
a(n) = (Sum_{j
a(n) = A005314(n) - A005314(n-1).
a(n) = A049853(n-1) - a(n-1).
a(n) = A005314(n) - a(n-2). (End)
Conjecture: a(n+1) + |A078065(n)| = 2*A005314(n+1). - Creighton Dement, Dec 21 2004
a(n+2) has g.f. (F_3(-x) + F_2(-x))/(F_4(-x) + F_3(-x)) = 1/(-x+1/(-x+1/(-x+1))) where F_n(x) is the n-th Fibonacci polynomial; see A011973. - Qiaochu Yuan (qchu(AT)mit.edu), Feb 19 2009
a(n) = A173022(2^(n-2) - 1) for n > 1. - Reinhard Zumkeller, Feb 07 2010
BINOMIAL transform of A176971 is a(n+1). - Michael Somos, Dec 13 2013
a(n) = hypergeom([(2-n)/3, 1-n/3, (1-n)/3], [1/2, -n+1], 27/4) for n > 1. - Peter Luschny, Apr 08 2018
G.f.: z/(1-z-z^3-z^4-z^5-...) for the compositions of n-1 avoiding 2. The g.f. for the number of compositions of n avoiding the part k is 1/(1-z-...-z^(k-1) - z^(k+1)-...). - Gregory L. Simay, Sep 09 2018
If p,q,r are the three solutions to x^3 = 2x^2 - x + 1, then a(n) = (p-1)*p^n/((p-q)*(p-r)) + (q-1)*q^n/((q-p)*(q-r)) + (r-1)*r^n/((r-p)*(r-q)). - Greg Dresden and AnXing Yang, Aug 12 2025

A008288 Square array of Delannoy numbers D(i,j) (i >= 0, j >= 0) read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 13, 7, 1, 1, 9, 25, 25, 9, 1, 1, 11, 41, 63, 41, 11, 1, 1, 13, 61, 129, 129, 61, 13, 1, 1, 15, 85, 231, 321, 231, 85, 15, 1, 1, 17, 113, 377, 681, 681, 377, 113, 17, 1, 1, 19, 145, 575, 1289, 1683, 1289, 575, 145, 19, 1, 1, 21, 181, 833, 2241, 3653, 3653
Offset: 0

Keywords

Comments

In the Formula section, some contributors use T(n,k) = D(n-k, k) (for 0 <= k <= n), which is the triangular version of the square array (D(n,k): n,k >= 0). Conversely, D(n,k) = T(n+k,k) for n,k >= 0. - Petros Hadjicostas, Aug 05 2020
Also called the tribonacci triangle [Alladi and Hoggatt (1977)]. - N. J. A. Sloane, Mar 23 2014
D(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0), (0,1), (1,1). - Joerg Arndt, Jul 01 2011 [Corrected by N. J. A. Sloane, May 30 2020]
Or, triangle read by rows of coefficients of polynomials P[n](x) defined by P[0] = 1, P[1] = x+1; for n >= 2, P[n] = (x+1)*P[n-1] + x*P[n-2].
D(n, k) is the number of k-matchings of a comb-like graph with n+k teeth. Example: D(1, 3) = 7 because the graph consisting of a horizontal path ABCD and the teeth Aa, Bb, Cc, Dd has seven 3-matchings: four triples of three teeth and the three triples {Aa, Bb, CD}, {Aa, Dd, BC}, {Cc, Dd, AB}. Also D(3, 1)=7, the 1-matchings of the same graph being the seven edges: {AB}, {BC}, {CD}, {Aa}, {Bb}, {Cc}, {Dd}. - Emeric Deutsch, Jul 01 2002
Sum of n-th antidiagonal of the array D is A000129(n+1). - Reinhard Zumkeller, Dec 03 2004 [Edited by Petros Hadjicostas, Aug 05 2020 so that the counting of antidiagonals of D starts at n = 0. That is, the sum of the terms in the n-th row of the triangles T is A000129(n+1).]
The A-sequence for this Riordan type triangle (see one of Paul Barry's comments under Formula) is A112478 and the Z-sequence the trivial: {1, 0, 0, 0, ...}. See the W. Lang link under A006232 for Sheffer a- and z-sequences where also Riordan A- and Z-sequences are explained. This leads to the recurrence for the triangle given below. - Wolfdieter Lang, Jan 21 2008
The triangle or chess sums, see A180662 for their definitions, link the Delannoy numbers with twelve different sequences, see the crossrefs. All sums come in pairs due to the symmetrical nature of this triangle. The knight sums Kn14 and Kn15 have been added. It is remarkable that all knight sums are related to the tribonacci numbers, that is, A000073 and A001590, but none of the others. - Johannes W. Meijer, Sep 22 2010
This sequence, A008288, is jointly generated with A035607 as an array of coefficients of polynomials u(n,x): initially, u(1,x) = v(1,x) = 1; for n > 1, u(n,x) = x*u(n-1,x) + v(n-1) and v(n,x) = 2*x*u(n-1,x) + v(n-1,x). See the Mathematica section. - Clark Kimberling, Mar 09 2012
Row n, for n > 0, of Roger L. Bagula's triangle in the Example section shows the coefficients of the polynomial u(n) = c(0) + c(1)*x + ... + c(n)*x^n which is the numerator of the n-th convergent of the continued fraction [k, k, k, ...], where k = sqrt(x) + 1/sqrt(x); see A230000. - Clark Kimberling, Nov 13 2013
In an n-dimensional hypercube lattice, D(n,k) gives the number of nodes situated at a Minkowski (Manhattan) distance of k from a given node. In cellular automata theory, the cells at Manhattan distance k are called the von Neumann neighborhood of radius k. For k=1, see A005843. - Dmitry Zaitsev, Dec 10 2015
These numbers appear as the coefficients of series relating spherical and bispherical harmonics, in the solutions of Laplace's equation in 3D. [Majic 2019, Eq. 22] - Matt Majic, Nov 24 2019
From Peter Bala, Feb 19 2020: (Start)
The following remarks assume an offset of 1 in the row and column indices of the triangle.
The sequence of row polynomials T(n,x), beginning with T(1,x) = x, T(2,x) = x + x^2, T(3,x) = x + 3*x^2 + x^3, ..., is a strong divisibility sequence of polynomials in the ring Z[x]; that is, for all positive integers n and m, poly_gcd(T(n,x), T(m,x)) = T(gcd(n, m), x) - apply Norfleet (2005), Theorem 3. Consequently, the sequence (T(n,x): n >= 1) is a divisibility sequence in the polynomial ring Z[x]; that is, if n divides m then T(n,x) divides T(m,x) in Z[x].
Let S(x) = 1 + 2*x + 6*x^2 + 22*x^3 + ... denote the o.g.f. for the large Schröder numbers A006318. The power series (x*S(x))^n, n = 2, 3, 4, ..., can be expressed as a linear combination with polynomial coefficients of S(x) and 1: (x*S(x))^n = T(n-1,-x) - T(n,-x)*S(x). The result can be extended to negative integer n if we define T(0,x) = 0 and T(-n,x) = (-1)^(n+1) * T(n,x)/x^n. Cf. A115139.
[In the previous two paragraphs, D(n,x) was replaced with T(n,x) because the contributor is referring to the rows of the triangle T(n,k), not the rows of the array D(n,k). - Petros Hadjicostas, Aug 05 2020] (End)
Named after the French amateur mathematician Henri-Auguste Delannoy (1833-1915). - Amiram Eldar, Apr 15 2021
D(i,j) = D(j,i). With this and Dmitry Zaitsev's Dec 10 2015 comment, D(i,j) can be considered the number of points at L1 distance <= i in Z^j or the number of points at L1 distance <= j in Z^i from any given point. The rows and columns of D(i,j) are the crystal ball sequences on cubic lattices. See the first example below. The n-th term in the k-th crystal ball sequence can be considered the number of points at distance <= n from any point in a k-dimensional cubic lattice, or the number of points at distance <= k from any point in an n-dimensional cubic lattice. - Shel Kaphan, Jan 01 2023 and Jan 07 2023
Dimensions of hom spaces Hom(R^{(i)}, R^{(j)}) in the Delannoy category attached to the oligomorphic group of order preserving self-bijections of the real line. - Noah Snyder, Mar 22 2023

Examples

			The square array D(i,j) (i >= 0, j >= 0) begins:
  1, 1,  1,   1,   1,   1,    1,    1,    1,    1, ... = A000012
  1, 3,  5,   7,   9,  11,   13,   15,   17,   19, ... = A005408
  1, 5, 13,  25,  41,  61,   85,  113,  145,  181, ... = A001844
  1, 7, 25,  63, 129, 231,  377,  575,  833, 1159, ... = A001845
  1, 9, 41, 129, 321, 681, 1289, 2241, 3649, 5641, ... = A001846
  ...
For D(2,5) = 61, which is seen above in the row labeled A001844, we calculate the sum (9 + 11 + 41) of the 3 nearest terms above and/or to the left. - _Peter Munn_, Jan 01 2023
D(2,5) = 61 can also be obtained from the row labeled A005408 using a recurrence mentioned in the formula section:  D(2,5) = D(1,5) + 2*Sum_{k=0..4} D(1,k), so D(2,5) = 11 + 2*(1+3+5+7+9) = 11 + 2*25. - _Shel Kaphan_, Jan 01 2023
As a triangular array (on its side) this begins:
   0,   0,   0,   0,   1,   0,  11,   0, ...
   0,   0,   0,   1,   0,   9,   0,  61, ...
   0,   0,   1,   0,   7,   0,  41,   0, ...
   0,   1,   0,   5,   0,  25,   0, 129, ...
   1,   0,   3,   0,  13,   0,  63,   0, ...
   0,   1,   0,   5,   0,  25,   0, 129, ...
   0,   0,   1,   0,   7,   0,  41,   0, ...
   0,   0,   0,   1,   0,   9,   0,  61, ...
   0,   0,   0,   0,   1,   0,  11,   0, ...
   [Edited by _Shel Kaphan_, Jan 01 2023]
From _Roger L. Bagula_, Dec 09 2008: (Start)
As a triangle T(n,k) (with rows n >= 0 and columns k = 0..n), this begins:
   1;
   1,  1;
   1,  3,   1;
   1,  5,   5,   1;
   1,  7,  13,   7,    1;
   1,  9,  25,  25,    9,    1;
   1, 11,  41,  63,   41,   11,    1;
   1, 13,  61, 129,  129,   61,   13,   1;
   1, 15,  85, 231,  321,  231,   85,  15,   1;
   1, 17, 113, 377,  681,  681,  377, 113,  17,  1;
   1, 19, 145, 575, 1289, 1683, 1289, 575, 145, 19, 1;
   ... (End)
Triangle T(n,k) recurrence: 63 = T(6,3) = 25 + 13 + 25 = T(5,2) + T(4,2) + T(5,3).
Triangle T(n,k) recurrence with A-sequence A112478: 63 = T(6,3) = 1*25 + 2*25 - 2*9 + 6*1 (T entries from row n = 5 only). [Here the formula T(n,k) = Sum_{j=0..n-k} A112478(j) * T(n-1, k-1+j) is used with n = 6 and k = 3; i.e., T(6,3) = Sum_{j=0..3} A111478(j) * T(5, 2+j). - _Petros Hadjicostas_, Aug 05 2020]
From _Philippe Deléham_, Mar 29 2012: (Start)
Subtriangle of the triangle given by (1, 0, 1, -1, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, ...) where DELTA is the operator defined in A084938:
   1;
   1,  0;
   1,  1,  0;
   1,  3,  1,  0;
   1,  5,  5,  1,  0;
   1,  7, 13,  7,  1,  0;
   1,  9, 25, 25,  9,  1, 0;
   1, 11, 41, 63, 41, 11, 1, 0;
   ...
Subtriangle of the triangle given by (0, 1, 0, 0, 0, ...) DELTA (1, 0, 1, -1, 0, 0, 0, ...) where DELTA is the operator defined in A084938:
   1;
   0, 1;
   0, 1,  1;
   0, 1,  3,  1;
   0, 1,  5,  5,  1;
   0, 1,  7, 13,  7,  1;
   0, 1,  9, 25, 25,  9,  1;
   0, 1, 11, 41, 63, 41, 11, 1;
   ... (End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 593.
  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 81.
  • L. Moser and W. Zayachkowski, Lattice paths with diagonal steps, Scripta Mathematica, 26 (1963), 223-229.
  • G. Picou, Note #2235, L'Intermédiaire des Mathématiciens, 8 (1901), page 281. - N. J. A. Sloane, Mar 02 2022
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 28.

Crossrefs

Sums of antidiagonals: A000129 (Pell numbers).
Main diagonal: A001850 (central Delannoy numbers), which has further information and references.
A002002, A026002, and A190666 are +-k-diagonals for k=1, 2, 3 resp. - Shel Kaphan, Jan 01 2023
See also A027618.
Cf. A059446.
Has same main diagonal as A064861. Different from A100936.
Read mod small primes: A211312, A211313, A211314, A211315.
Triangle sums (see the comments): A000129 (Row1); A056594 (Row2); A000073 (Kn11 & Kn21); A089068 (Kn12 & Kn22); A180668 (Kn13 & Kn23); A180669 (Kn14 & Kn24); A180670 (Kn15 & Kn25); A099463 (Kn3 & Kn4); A116404 (Fi1 & Fi2); A006498 (Ca1 & Ca2); A006498(3*n) (Ca3 & Ca4); A079972 (Gi1 & Gi2); A079972(4*n) (Gi3 & Gi4); A079973(3*n) (Ze1 & Ze2); A079973(2*n) (Ze3 & Ze4).
Cf. A102413, A128966. (D(n,1)) = A005843. Cf. A115139.

Programs

  • Haskell
    a008288 n k = a008288_tabl !! n !! k
    a008288_row n = a008288_tabl !! n
    a008288_tabl = map fst $ iterate
        (\(us, vs) -> (vs, zipWith (+) ([0] ++ us ++ [0]) $
                           zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [1, 1])
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Maple
    A008288 := proc(n, k) option remember; if k = 0 then 1 elif n=k then 1 else procname(n-1, k-1) + procname(n-2, k-1) + procname(n-1, k) end if; end proc: seq(seq(A008288(n,k),k=0..n), n=0..10); # triangular indices n and k
    P[0]:=1; P[1]:=x+1; for n from 2 to 12 do P[n]:=expand((x+1)*P[n-1]+x*P[n-2]); lprint(P[n]); lprint(seriestolist(series(P[n],x,200))); end do:
  • Mathematica
    (* Next, A008288 jointly generated with A035607 *)
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := 2 x*u[n - 1, x] + v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A008288 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A035607 *)
    (* Clark Kimberling, Mar 09 2012 *)
    d[n_, k_] := Binomial[n+k, k]*Hypergeometric2F1[-k, -n, -n-k, -1]; A008288 = Flatten[Table[d[n-k, k], {n, 0, 12}, {k, 0, n}]] (* Jean-François Alcover, Apr 05 2012, after 3rd formula *)
  • Python
    from functools import cache
    @cache
    def delannoy_row(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [1, 1]
        rov = delannoy_row(n - 2)
        row = delannoy_row(n - 1) + [1]
        for k in range(n - 1, 0, -1):
            row[k] += row[k - 1] + rov[k - 1]
        return row
    for n in range(10): print(delannoy_row(n))  # Peter Luschny, Jul 30 2023
  • Sage
    for k in range(8):  # seen as an array, read row by row
        a = lambda n: hypergeometric([-n, -k], [1], 2)
        print([simplify(a(n)) for n in range(11)]) # Peter Luschny, Nov 19 2014
    

Formula

D(n, 0) = 1 = D(0, n) for n >= 0; D(n, k) = D(n, k-1) + D(n-1, k-1) + D(n-1, k).
Bivariate o.g.f.: Sum_{n >= 0, k >= 0} D(n, k)*x^n*y^k = 1/(1 - x - y - x*y).
D(n, k) = Sum_{d = 0..min(n,k)} binomial(k, d)*binomial(n+k-d, k) = Sum_{d=0..min(n,k)} 2^d*binomial(n, d)*binomial(k, d). [Edited by Petros Hadjicostas, Aug 05 2020]
Seen as a triangle read by rows: T(n, 0) = T(n, n) = 1 for n >= 0 and T(n, k) = T(n-1, k-1) + T(n-2, k-1) + T(n-1, k), 0 < k < n and n > 1. - Reinhard Zumkeller, Dec 03 2004
Read as a number triangle, this is the Riordan array (1/(1-x), x(1+x)/(1-x)) with T(n, k) = Sum_{j=0..n-k} C(n-k, j) * C(k, j) * 2^j. - Paul Barry, Jul 18 2005
T(n,k) = Sum_{j=0..n-k} C(k,j)*C(n-j,k). - Paul Barry, May 21 2006
Let y^k(n) be the number of Khalimsky-continuous functions f from [0,n-1] to Z such that f(0) = 0 and f(n-1) = k. Then y^k(n) = D(i,j) for i = (1/2)*(n-1-k) and j = (1/2)*(n-1+k) where n-1+k belongs to 2Z. - Shiva Samieinia (shiva(AT)math.su.se), Oct 08 2007
Recurrence for triangle from A-sequence (see the Wolfdieter Lang comment above): T(n,k) = Sum_{j=0..n-k} A112478(j) * T(n-1, k-1+j), n >= 1, k >= 1. [For k > n, the sum is empty, in which case T(n,k) = 0.]
From Peter Bala, Jul 17 2008: (Start)
The n-th row of the square array is the crystal ball sequence for the product lattice A_1 x ... x A_1 (n copies). A035607 is the table of the associated coordination sequences for these lattices.
The polynomial p_n(x) := Sum {k = 0..n} 2^k * C(n,k) * C(x,k) = Sum_{k = 0..n} C(n,k) * C(x+k,n), whose values [p_n(0), p_n(1), p_n(2), ... ] give the n-th row of the square array, is the Ehrhart polynomial of the n-dimensional cross polytope (the hyperoctahedron) [Bump et al. (2000), Theorem 6].
The first few values are p_0(x) = 1, p_1(x) = 2*x + 1, p_2(x) = 2*x^2 + 2*x + 1 and p_3(x) = (4*x^3 + 6*x^2 + 8*x + 3)/3.
The reciprocity law p_n(m) = p_m(n) reflects the symmetry of the table.
The polynomial p_n(x) is the unique polynomial solution of the difference equation (x+1)*f(x+1) - x*f(x-1) = (2*n+1)*f(x), normalized so that f(0) = 1.
These polynomials have their zeros on the vertical line Re x = -1/2 in the complex plane; that is, the polynomials p_n(x-1), n = 1,2,3,..., satisfy a Riemann hypothesis [Bump et al. (2000), Theorem 4]. The o.g.f. for the p_n(x) is (1 + t)^x/(1 - t)^(x + 1) = 1 + (2*x + 1)*t + (2*x^2 + 2*x + 1)*t^2 + ... .
The square array of Delannoy numbers has a close connection with the constant log(2). The entries in the n-th row of the array occur in the series acceleration formula log(2) = (1 - 1/2 + 1/3 - ... + (-1)^(n+1)/n) + (-1)^n * Sum_{k>=1} (-1)^(k+1)/(k*D(n,k-1)*D(n,k)). [T(n,k) was replaced with D(n,k) in the formula to agree with the beginning of the paragraph. - Petros Hadjicostas, Aug 05 2020]
For example, the fourth row of the table (n = 3) gives the series log(2) = 1 - 1/2 + 1/3 - 1/(1*1*7) + 1/(2*7*25) - 1/(3*25*63) + 1/(4*63*129) - ... . See A142979 for further details.
Also the main diagonal entries (the central Delannoy numbers) give the series acceleration formula Sum_{n>=1} 1/(n*D(n-1,n-1)*D(n,n)) = (1/2)*log(2), a result due to Burnside. [T(n,n) was replaced here with D(n,n) to agree with the previous paragraphs. - Petros Hadjicostas, Aug 05 2020]
Similar relations hold between log(2) and the crystal ball sequences of the C_n lattices A142992. For corresponding results for the constants zeta(2) and zeta(3), involving the crystal ball sequences for root lattices of type A_n and A_n x A_n, see A108625 and A143007 respectively. (End)
From Peter Bala, Oct 28 2008: (Start)
Hilbert transform of Pascal's triangle A007318 (see A145905 for the definition of this term).
D(n+a,n) = P_n(a,0;3) for all integer a such that a >= -n, where P_n(a,0;x) is the Jacobi polynomial with parameters (a,0) [Hetyei]. The related formula A(n,k) = P_k(0,n-k;3) defines the table of asymmetric Delannoy numbers, essentially A049600. (End)
Seen as a triangle read by rows: T(n, k) = Hyper2F1([k-n, -k], [1], 2). - Peter Luschny, Aug 02 2014, Oct 13 2024.
From Peter Bala, Jun 25 2015: (Start)
O.g.f. for triangle T(n,k): A(z,t) = 1/(1 - (1 + t)*z - t*z^2) = 1 + (1 + t)*z + (1 + 3*t + t^2)*z^2 + (1 + 5*t + 5*t^2 + t^3)*z^3 + ....
1 + z*d/dz(A(z,t))/A(z,t) is the o.g.f. for A102413. (End)
E.g.f. for the n-th subdiagonal of T(n,k), n >= 0, equals exp(x)*P(n,x), where P(n,x) is the polynomial Sum_{k = 0..n} binomial(n,k)*(2*x)^k/k!. For example, the e.g.f. for the second subdiagonal is exp(x)*(1 + 4*x + 4*x^2/2) = 1 + 5*x + 13*x^2/2! + 25*x^3/3! + 41*x^4/4! + 61*x^5/5! + .... - Peter Bala, Mar 05 2017 [The n-th subdiagonal of triangle T(n,k) is the n-th row of array D(n,k).]
Let a_i(n) be multiplicative with a_i(p^e) = D(i, e), p prime and e >= 0, then Sum_{n > 0} a_i(n)/n^s = (zeta(s))^(2*i+1)/(zeta(2*s))^i for i >= 0. - Werner Schulte, Feb 14 2018
Seen as a triangle read by rows: T(n,k) = Sum_{i=0..k} binomial(n-i, i) * binomial(n-2*i, k-i) for 0 <= k <= n. - Werner Schulte, Jan 09 2019
Univariate generating function: Sum_{k >= 0} D(n,k)*z^k = (1 + z)^n/(1 - z)^(n+1). [Dziemianczuk (2013), Eq. 5.3] - Matt Majic, Nov 24 2019
(n+1)*D(n+1,k) = (2*k+1)*D(n,k) + n*D(n-1,k). [Majic (2019), Eq. 22] - Matt Majic, Nov 24 2019
For i, j >= 1, D(i,j) = D(i,j-1) + 2*Sum_{k=0..i-1} D(k,j-1), or, because D(i,j) = D(j,i), D(i,j) = D(i-1,j) + 2*Sum_{k=0..j-1} D(i-1,k). - Shel Kaphan, Jan 01 2023
Sum_{k=0..n} T(n,k)^2 = A026933(n). - R. J. Mathar, Nov 07 2023
Let S(x) = (1 - x - (1 - 6*x + x^2)^(1/2))/(2*x) denote the g.f. of the sequence of large Schröder numbers A006318. Read as a lower triangular array, the signed n-th row polynomial R(n, -x) = 1/sqrt(1 - 6*x + x^2) *( 1/S(x)^(n+1) + (x*S(x))^(n+1) ). For example, R(4, -x) = 1 - 7*x + 13*x^2 - 7*x^3 + x^4 = 1/sqrt(1 - 6*x + x^2) * ( 1/S(x)^5 + (x*S(x))^5 ). Cf. A102413. - Peter Bala, Aug 01 2024

Extensions

Expanded description from Clark Kimberling, Jun 15 1997
Additional references from Sylviane R. Schwer (schwer(AT)lipn.univ-paris13.fr), Nov 28 2001
Changed the notation to make the formulas more precise. - N. J. A. Sloane, Jul 01 2002

A001654 Golden rectangle numbers: F(n) * F(n+1), where F(n) = A000045(n) (Fibonacci numbers).

Original entry on oeis.org

0, 1, 2, 6, 15, 40, 104, 273, 714, 1870, 4895, 12816, 33552, 87841, 229970, 602070, 1576239, 4126648, 10803704, 28284465, 74049690, 193864606, 507544127, 1328767776, 3478759200, 9107509825, 23843770274, 62423800998, 163427632719, 427859097160, 1120149658760
Offset: 0

Keywords

Comments

a(n)/A007598(n) ~= golden ratio, especially for larger n. - Robert Happelberg (roberthappelberg(AT)yahoo.com), Jul 25 2005
Let phi be the golden ratio (cf. A001622). Then 1/phi = phi - 1 = Sum_{n>=1} (-1)^(n-1)/a(n), an alternating infinite series consisting solely of unit fractions. - Franz Vrabec, Sep 14 2005
a(n+2) is the Hankel transform of A005807 aerated. - Paul Barry, Nov 04 2008
A more exact name would be: Golden convergents to rectangle numbers. These rectangles are not actually golden (ratio of sides is not phi) but are golden convergents (sides are numerator and denominator of convergents in the continued fraction expansion of phi, whence ratio of sides converges to phi). - Daniel Forgues, Nov 29 2009
The Kn4 sums (see A180662 for definition) of the "Races with Ties" triangle A035317 lead to this sequence. - Johannes W. Meijer, Jul 20 2011
Numbers m such that m(5m+2)+1 or m(5m-2)+1 is a square. - Bruno Berselli, Oct 22 2012
In pairs, these numbers are important in finding binomial coefficients that appear in at least six places in Pascal's triangle. For instance, the pair (m,n) = (40, 104) finds the numbers binomial(n-1,m) = binomial(n,m-1). Two additional numbers are found on the other side of the triangle. The final two numbers appear in row binomial(n-1,m). See A003015. - T. D. Noe, Mar 13 2013
For n>1, a(n) is one-half the area of the trapezoid created by the four points (F(n),L(n)), (L(n),F(n)), (F(n+1), L(n+1)), (L(n+1), F(n+1)) where F(n) = A000045(n) and L(n) = A000032(n). - J. M. Bergot, May 14 2014
[Note on how to calculate: take the two points (a,b) and (c,d) with a
a(n) = A067962(n-1) / A067962(n-2), n > 1. - Reinhard Zumkeller, Sep 24 2015
Can be obtained (up to signs) by setting x = F(n)/F(n+1) in g.f. for Fibonacci numbers - see Pongsriiam. - N. J. A. Sloane, Mar 23 2017

Examples

			G.f. = x + 2*x^2 + 6*x^3 + 15*x^4 + 40*x^5 + 104*x^6 + 273*x^7 + 714*x^8 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 9.
  • 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

Programs

  • Haskell
    a001654 n = a001654_list !! n
    a001654_list = zipWith (*) (tail a000045_list) a000045_list
    -- Reinhard Zumkeller, Jun 08 2013
    
  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else 2*Self(n-1) + 2*Self(n-2) - Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 17 2018
  • Maple
    with(combinat): A001654:=n->fibonacci(n)*fibonacci(n+1):
    seq(A001654(n), n=0..28); # Zerinvary Lajos, Oct 07 2007
  • Mathematica
    LinearRecurrence[{2,2,-1}, {0,1,2}, 100] (* Vladimir Joseph Stephan Orlovsky, Jul 03 2011 *)
    Times@@@Partition[Fibonacci[Range[0,30]],2,1] (* Harvey P. Dale, Aug 18 2011 *)
    Accumulate[Fibonacci[Range[0, 30]]^2] (* Paolo Xausa, May 31 2024 *)
  • PARI
    A001654(n)=fibonacci(n)*fibonacci(n+1);
    
  • PARI
    b(n, k)=prod(j=1, k, fibonacci(n+j)/fibonacci(j));
    vector(30, n, b(n-1, 2))  \\ Joerg Arndt, May 08 2016
    
  • Python
    from sympy import fibonacci as F
    def a(n): return F(n)*F(n + 1)
    [a(n) for n in range(101)] # Indranil Ghosh, Aug 03 2017
    
  • Python
    from math import prod
    from gmpy2 import fib2
    def A001654(n): return prod(fib2(n+1)) # Chai Wah Wu, May 19 2022
    

Formula

a(n) = A010048(n+1, 2) = Fibonomial(n+1, 2).
a(n) = A006498(2*n-1).
a(n) = a(n - 1) + A007598(n) = a(n - 1) + A000045(n)^2 = Sum_{j <= n} Fibonacci(j)^2. - Henry Bottomley, Feb 09 2001 [corrected by Ridouane Oudra, Apr 12 2025]
For n > 0, 1 - 1/a(n+1) = Sum_{k=1..n} 1/(F(k)*F(k+2)) where F(k) is the k-th Fibonacci number. - Benoit Cloitre, Aug 31 2002.
G.f.: x/(1-2*x-2*x^2+x^3) = x/((1+x)*(1-3*x+x^2)). (Simon Plouffe in his 1992 dissertation; see Comments to A055870),
a(n) = 3*a(n-1) - a(n-2) - (-1)^n = -a(-1-n).
Let M = the 3 X 3 matrix [1 2 1 / 1 1 0 / 1 0 0]; then a(n) = the center term in M^n *[1 0 0]. E.g., a(5) = 40 since M^5 * [1 0 0] = [64 40 25]. - Gary W. Adamson, Oct 10 2004
a(n) = Sum{k=0..n} Fibonacci(k)^2. The proof is easy. Start from a square (1*1). On the right side, draw another square (1*1). On the above side draw a square ((1+1)*(1+1)). On the left side, draw a square ((1+2)*(1+2)) and so on. You get a rectangle (F(n)*F(1+n)) which contains all the squares of side F(1), F(2), ..., F(n). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 19 2007
With phi = (1+sqrt(5))/2, a(n) = round((phi^(2*n+1))/5) = floor((1/2) + (phi^(2*n+1))/5), n >= 0. - Daniel Forgues, Nov 29 2009
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3), a(1)=1, a(2)=2, a(3)=6. - Sture Sjöstedt, Feb 06 2010
a(n) = (A002878(n) - (-1)^n)/5. - R. J. Mathar, Jul 22 2010
a(n) = 1/|F(n+1)/F(n) - F(n)/F(n-1)| where F(n) = Fibonacci numbers A000045. b(n) = F(n+1)/F(n) - F(n)/F(n-1): 1/1, -1/2, 1/6, -1/15, 1/40, -1/104, ...; c(n) = 1/b(n) = a(n)*(-1)^(n+1): 1, -2, 6, -15, 40, -104, ... (n=1,2,...). - Thomas Ordowski, Nov 04 2010
a(n) = (Fibonacci(n+2)^2 - Fibonacci(n-1)^2)/4. - Gary Detlefs, Dec 03 2010
Let d(n) = n mod 2, a(0)=0 and a(1)=1. For n > 1, a(n) = d(n) + 2*a(n-1) + Sum_{k=0..n-2} a(k). - L. Edson Jeffery, Mar 20 2011
From Tim Monahan, Jul 11 2011: (Start)
a(n+1) = ((2+sqrt(5))*((3+sqrt(5))/2)^n+(2-sqrt(5))*((3-sqrt(5))/2)^n+(-1)^n)/5.
a(n) = ((1+sqrt(5))*((3+sqrt(5))/2)^n+(1-sqrt(5))*((3-sqrt(5))/2)^n-2*(-1)^n)/10. (End)
From Wolfdieter Lang, Jul 21 2012: (Start)
a(n) = (2*A059840(n+2) - A027941(n))/3, n >= 0, with A059840(n+2) = Sum_{k=0..n} F(k)*F(k+2) and A027941(n) = A001519(n+1) - 1, n >= 0, where A001519(n+1) = F(2*n+1). (End)
a(n) = (-1)^n * Sum_{k=0..n} (-1)^k*F(2*k), n >= 0. - Wolfdieter Lang, Aug 11 2012
a(-1-n) = -a(n) for all n in Z. - Michael Somos, Sep 19 2014
0 = a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(-2*a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Sep 19 2014
a(n) = (L(2*n+1) - (-1)^n)/5 with L(k) = A000032(k). - J. M. Bergot, Apr 15 2016
E.g.f.: ((3 + sqrt(5))*exp((5+sqrt(5))*x/2) - 2*exp((2*x)/(3+sqrt(5))+x) - 1 - sqrt(5))*exp(-x)/(5*(1 + sqrt(5))). - Ilya Gutkovskiy, Apr 15 2016
From Klaus Purath, Apr 24 2019: (Start)
a(n) = A061646(n) - Fibonacci(n-1)^2.
a(n) = (A061646(n+1) - A061646(n))/2. (End)
a(n) = A226205(n+1) + (-1)^(n+1). - Flávio V. Fernandes, Apr 23 2020
Sum_{n>=1} 1/a(n) = A290565. - Amiram Eldar, Oct 06 2020
Product_{n>=2} (1 + (-1)^n/a(n)) = phi^2/2 (A239798). - Amiram Eldar, Dec 02 2024
G.f.: x * exp( Sum_{k>=1} F(3*k)/F(k) * x^k/k ), where F(n) = A000045(n). - Seiichi Manyama, May 07 2025

Extensions

Extended by Wolfdieter Lang, Jun 27 2000

A007598 Squared Fibonacci numbers: a(n) = F(n)^2 where F = A000045.

Original entry on oeis.org

0, 1, 1, 4, 9, 25, 64, 169, 441, 1156, 3025, 7921, 20736, 54289, 142129, 372100, 974169, 2550409, 6677056, 17480761, 45765225, 119814916, 313679521, 821223649, 2149991424, 5628750625, 14736260449, 38580030724, 101003831721, 264431464441, 692290561600
Offset: 0

Keywords

Comments

a(n)*(-1)^(n+1) = (2*(1-T(n,-3/2))/5), n>=0, with Chebyshev's polynomials T(n,x) of the first kind, is the r=-1 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found. - Wolfdieter Lang, Oct 18 2004
From Giorgio Balzarotti, Mar 11 2009: (Start)
Determinant of power series with alternate signs of gamma matrix with determinant 1!.
a(n) = Determinant(A - A^2 + A^3 - A^4 + A^5 - ... - (-1)^n*A^n) where A is the submatrix A(1..2,1..2) of the matrix with factorial determinant.
A = [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...], [1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...], ...]; note: Determinant A(1..n,1..n) = (n-1)!.
a(n) is even with respect to signs of power of A.
See A158039...A158050 for sequence with matrix 2!, 3!, ... (End)
Equals the INVERT transform of (1, 3, 2, 2, 2, ...). Example: a(7) = 169 = (1, 1, 4, 9, 25, 64) dot (2, 2, 2, 2, 3, 1) = (2 + 2 + 8 + 18 + 75 + 64). - Gary W. Adamson, Apr 27 2009
This is a divisibility sequence.
a(n+1)*(-1)^n, n>=0, is the sequence of the alternating row sums of the Riordan triangle A158454. - Wolfdieter Lang, Dec 18 2010
a(n+1) is the number of tilings of a 2 X 2n rectangle with n tetrominoes of any shape, cf. A230031. - Alois P. Heinz, Nov 29 2013
This is the case P1 = 1, P2 = -6, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 31 2014
Differences between successive golden rectangle numbers A001654. - Jonathan Sondow, Nov 05 2015
a(n+1) is the number of 2 X n matrices that can be obtained from a 2 X n matrix by moving each element to an adjacent position, horizontally or vertically. This is because F(n+1) is the number of domino tilings of that matrix, therefore with a checkerboard coloring and two domino tilings we can move the black element of each domino of the first tiling to the white element of the same domino and similarly move the white element of each domino of the second tiling to the black element of the same domino. - Fabio Visonà, May 04 2022
In general, squaring the terms of a second-order linear recurrence with signature (c,d) will result in a third-order linear recurrence with signature (c^2+d,(c^2+d)*d,-d^3). - Gary Detlefs, Jan 05 2023

Examples

			G.f. = x + x^2 + 4*x^3 + 9*x^4 + 25*x^5 + 64*x^6 + 169*x^7 + 441*x^8 + ...
		

References

  • Arthur T. Benjamin and Jennifer J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 8.
  • Ross Honsberger, Mathematical Gems III, M.A.A., 1985, p. 130.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Richard P. Stanley, Enumerative Combinatorics I, Example 4.7.14, p. 251.

Crossrefs

Bisection of A006498 and A074677. First differences of A001654.
Second row of array A103323.
Half of A175395.

Programs

  • GAP
    List([0..30], n -> Fibonacci(n)^2); # G. C. Greubel, Dec 10 2018
    
  • Haskell
    a007598 = (^ 2) . a000045  -- Reinhard Zumkeller, Sep 01 2013
    
  • Magma
    [Fibonacci(n)^2: n in [0..30]]; // Vincenzo Librandi, Apr 14 2011
    
  • Maple
    with(combinat): seq(fibonacci(n)^2, n=0..27); # Zerinvary Lajos, Sep 21 2007
  • Mathematica
    f[n_] := Fibonacci[n]^2; Array[f, 4!, 0] (* Vladimir Joseph Stephan Orlovsky, Oct 25 2009 *)
    LinearRecurrence[{2,2,-1},{0,1,1},41] (* Harvey P. Dale, May 18 2011 *)
  • PARI
    {a(n) = fibonacci(n)^2};
    
  • PARI
    concat(0, Vec(x*(1-x)/((1+x)*(1-3*x+x^2)) + O(x^30))) \\ Altug Alkan, Nov 06 2015
    
  • Python
    from sympy import fibonacci
    def A007598(n): return fibonacci(n)**2 # Chai Wah Wu, Apr 14 2025
  • Sage
    [(fibonacci(n))^2 for n in range(0, 28)]# Zerinvary Lajos, May 15 2009
    
  • Sage
    [fibonacci(n)^2 for n in range(30)] # G. C. Greubel, Dec 10 2018
    

Formula

G.f.: x*(1-x)/((1+x)*(1-3*x+x^2)).
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3), n > 2. a(0)=0, a(1)=1, a(2)=1.
a(-n) = a(n) for all n in Z.
a(n) = A080097(n-2) + 1.
L.g.f.: 1/5*log((1+3*x+x^2)/(1-6*x+x^2)) = Sum_{n>=0} a(n)/n*x^n; special case of l.g.f. given in A079291. - Joerg Arndt, Apr 13 2011
a(0) = 0, a(1) = 1; a(n) = a(n-1) + Sum(a(n-i)) + k, 0 <= i < n where k = 1 when n is odd, or k = -1 when n is even. E.g., a(2) = 1 = 1 + (1 + 1 + 0) - 1, a(3) = 4 = 1 + (1 + 1 + 0) + 1, a(4) = 9 = 4 + (4 + 1 + 1 + 0) - 1, a(5) = 25 = 9 + (9 + 4 + 1 + 1 + 0) + 1. - Sadrul Habib Chowdhury (adil040(AT)yahoo.com), Mar 02 2004
a(n) = (2*Fibonacci(2*n+1) - Fibonacci(2*n) - 2*(-1)^n)/5. - Ralf Stephan, May 14 2004
a(n) = F(n-1)*F(n+1) - (-1)^n = A059929(n-1) - A033999(n).
Sum_{j=0..2*n} binomial(2*n,j)*a(j) = 5^(n-1)*A005248(n+1) for n >= 1 [P. Stanica]. Sum_{j=0..2*n+1} binomial(2*n+1,j)*a(j) = 5^n*A001519(n+1) [P. Stanica]. - R. J. Mathar, Oct 16 2006
a(n) = (A005248(n) - 2*(-1)^n)/5. - R. J. Mathar, Sep 12 2010
a(n) = (-1)^k*(Fibonacci(n+k)^2-Fibonacci(k)*Fibonacci(2*n+k)), for any k. - Gary Detlefs, Dec 13 2010
a(n) = 3*a(n-1) - a(n-2) + 2*(-1)^(n+1), n > 1. - Gary Detlefs, Dec 20 2010
a(n) = Fibonacci(2*n-2) + a(n-2). - Gary Detlefs, Dec 20 2010
a(n) = (Fibonacci(3*n) - 3*(-1)^n*Fibonacci(n))/(5*Fibonacci(n)), n > 0. - Gary Detlefs, Dec 20 2010
a(n) = (Fibonacci(n)*Fibonacci(n+4) - 3*Fibonacci(n)*Fibonacci(n+1))/2. - Gary Detlefs, Jan 17 2011
a(n) = (((3+sqrt(5))/2)^n + ((3-sqrt(5))/2)^n - 2*(-1)^n)/5; without leading zero we would have a(n) = ((3+sqrt(5))*((3+sqrt(5))/2)^n + (3-sqrt(5))*((3-sqrt(5))/2)^n + 4*(-1)^n)/10. - Tim Monahan, Jul 17 2011
E.g.f.: (exp((phi+1)*x) + exp((2-phi)*x) - 2*exp(-x))/5, with the golden section phi:=(1+sqrt(5))/2. From the Binet-de Moivre formula for F(n). - Wolfdieter Lang, Jan 13 2012
Starting with "1" = triangle A059260 * the Fibonacci sequence as a vector. - Gary W. Adamson, Mar 06 2012
a(0) = 0, a(1) = 1; a(n+1) = (a(n)^(1/2) + a(n-1)^(1/2))^2. - Thomas Ordowski, Jan 06 2013
a(n) + a(n-1) = A001519(n), n > 0. - R. J. Mathar, Mar 19 2014
From Peter Bala, Mar 31 2014: (Start)
a(n) = ( T(n,alpha) - T(n,beta) )/(alpha - beta), where alpha = 3/2 and beta = -1 and T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, 3/2; 1, 1/2].
a(n) = U(n-1,i/2)*U(n-1,-i/2), where U(n,x) denotes the Chebyshev polynomial of the second kind.
See the remarks in A100047 for the general connection between Chebyshev polynomials and 4th-order linear divisibility sequences. (End)
a(n) = (F(n+2)*F(n+3) - L(n)*L(n+1))/3 for F = A000045 and L = A000032. - J. M. Bergot, Jun 02 2014
0 = a(n)*(+a(n) - 2*a(n+1) - 2*a(n+2)) + a(n+1)*(+a(n+1) - 2*a(n+2)) + a(n+2)*(+a(n+2)) for all n in Z. - Michael Somos, Jun 03 2014
(F(n)*b(n+2))^2 + (F(n+1)*b(n-1))^2 = F(2*n+1)^3 = A001519(n+1)^3, with b(n) = a(n) + 2*(-1)^n and F(n) = A000045(n) (see Bruckman link). - Michel Marcus, Jan 24 2015
a(n) = 1/4*( a(n-2) - a(n-1) - a(n+1) + a(n+2) ). The same recurrence holds for A001254. - Peter Bala, Aug 18 2015
a(n) = F(n)*F(n+1) - F(n-1)*F(n). - Jonathan Sondow, Nov 05 2015
For n>2, a(n) = F(n-2)*(3*F(n-1) + F(n-3)) + F(2*n-5). Also, for n>2 a(n)=2*F(n-3)*F(n) + F(2*n-3) -(2)*(-1)^n. - J. M. Bergot, Nov 05 2015
a(n) = (F(n+2)^2 + L(n+1)^2) - 2*F(n+2)*L(n+1). - J. M. Bergot, Nov 08 2015
a(n) = F(n+3)^2 - 4*F(n+1)*F(n+2). - J. M. Bergot, Mar 17 2016
a(n) = (F(n-2)*F(n+2) + F(n-1)*F(n+1))/2. - J. M. Bergot, May 25 2017
4*a(n) = L(n+1)*L(n-1) - F(n+2)*F(n-2), where L = A000032. - Bruno Berselli, Sep 27 2017
a(n) = F(n+k)*F(n-k) + (-1)^(n+k)*a(k), for every integer k >= 0. - Federico Provvedi, Dec 10 2018
From Peter Bala, Nov 19 2019: (Start)
Sum_{n >= 3} 1/(a(n) - 1/a(n)) = 4/9.
Sum_{n >= 3} (-1)^n/(a(n) - 1/a(n)) = (10 - 3*sqrt(5))/18.
Conjecture: Sum_{n >= 1, n != 2*k+1} 1/(a(n) + (-1)^n*a(2*k+1)) = 1/a(4*k+2) for k = 0,1,2,.... (End)
Sum_{n>=1} 1/a(n) = A105393. - Amiram Eldar, Oct 22 2020
Product_{n>=2} (1 + (-1)^n/a(n)) = phi (A001622) (Falcon, 2016, p. 189, eq. (3.1)). - Amiram Eldar, Dec 03 2024

A059259 Triangle read by rows giving coefficient T(i,j) of x^i y^j in 1/(1-x-x*y-y^2) = 1/((1+y)(1-x-y)) for (i,j) = (0,0), (1,0), (0,1), (2,0), (1,1), (0,2), ...

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 0, 1, 3, 4, 2, 1, 1, 4, 7, 6, 3, 0, 1, 5, 11, 13, 9, 3, 1, 1, 6, 16, 24, 22, 12, 4, 0, 1, 7, 22, 40, 46, 34, 16, 4, 1, 1, 8, 29, 62, 86, 80, 50, 20, 5, 0, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 1, 10, 46, 128, 239, 314, 296, 200
Offset: 0

Author

N. J. A. Sloane, Jan 23 2001

Keywords

Comments

This sequence provides the general solution to the recurrence a(n) = a(n-1) + k*(k+1)*a(n-2), a(0)=a(1)=1. The solution is (1, 1, k^2 + k + 1, 2*k^2 + 2*k + 1, ...) whose coefficients can be read from the rows of the triangle. The row sums of the triangle are given by the case k=1. These are the Jacobsthal numbers, A001045. Viewed as a square array, its first row is (1,0,1,0,1,...) with e.g.f. cosh(x), g.f. 1/(1-x^2) and subsequent rows are successive partial sums given by 1/((1-x)^n * (1-x^2)). - Paul Barry, Mar 17 2003
Conjecture: every second column of this triangle is identical to a column in the square array A071921. For example, column 4 of A059259 (1, 3, 9, 22, 46, ...) appears to be the same as column 3 of A071921; column 6 of A059259 (1, 4, 16, 50, 130, 296, ...) appears to be the same as column 4 of A071921; and in general column 2k of A059259 appears to be the same as column k+1 of A071921. Furthermore, since A225010 is a transposition of A071921 (ignoring the latter's top row and two leftmost columns), there appears to be a correspondence between column 2k of A059259 and row k of A225010. - Mathew Englander, May 17 2014
T(n,k) is the number of n-tilings of a (one-dimensional) board that use k (1,1)-fence tiles and n-k squares. A (1,1)-fence is a tile composed of two pieces of width 1 separated by a gap of width 1. - Michael A. Allen, Jun 25 2020
See the Edwards-Allen 2020 paper, page 14, for proof of Englander's conjecture. - Michael De Vlieger, Dec 10 2020

Examples

			Triangle begins:
  1;
  1,  0;
  1,  1,  1;
  1,  2,  2,   0;
  1,  3,  4,   2,   1;
  1,  4,  7,   6,   3,   0;
  1,  5, 11,  13,   9,   3,   1;
  1,  6, 16,  24,  22,  12,   4,   0;
  1,  7, 22,  40,  46,  34,  16,   4,  1;
  1,  8, 29,  62,  86,  80,  50,  20,  5,  0;
  1,  9, 37,  91, 148, 166, 130,  70, 25,  5, 1;
  1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 0;
...
		

Crossrefs

See A059260 for an explicit formula.
Diagonals of this triangle are given by A006498.
Similar to the triangles A035317, A080242, A108561, A112555.

Programs

  • Maple
    read transforms; 1/(1-x-x*y-y^2); SERIES2(%,x,y,12); SERIES2TOLIST(%,x,y,12);
  • Mathematica
    T[n_, 0]:= 1; T[n_, n_]:= (1+(-1)^n)/2; T[n_, k_]:= T[n, k] = T[n-1, k] + T[n-1, k-1]; Table[T[n, k], {n, 0, 10} , {k, 0, n}]//Flatten (* G. C. Greubel, Jan 03 2017 *)
  • PARI
    {T(n,k) = if(k==0, 1, if(k==n, (1+(-1)^n)/2, T(n-1,k) +T(n-1,k-1)) )};
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Apr 29 2019
  • Sage
    def A059259_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return (-1)^n
            if k==0: return 0
            return prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^(n-k+1)*prec(n+1, k) for k in (1..n)]
    for n in (1..12): print(A059259_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

G.f.: 1/(1 - x - x*y - y^2).
As a square array read by antidiagonals, this is T(n, k) = Sum_{i=0..n} (-1)^(n-i)*C(i+k, k). - Paul Barry, Jul 01 2003
T(2*n,n) = A026641(n). - Philippe Deléham, Mar 08 2007
T(n,k) = T(n-1,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0) = T(1,0) = T(2,0) = T(2,1) = T(2,2)=1, T(1,1)=0, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Nov 24 2013
T(n,0) = 1, T(n,n) = (1+(-1)^n)/2, and T(n,k) = T(n-1,k) + T(n-1,k-1) for 0 < k < n. - Mathew Englander, May 24 2014
From Michael A. Allen, Jun 25 2020: (Start)
T(n,k) + T(n-1,k-1) = binomial(n,k) if n >= k > 0.
T(2*n-1,2*n-2) = T(2*n,2*n-1) = n, T(2*n,2*n-2) = n^2, T(2*n+1,2*n-1) = n*(n+1) for n > 0.
T(n,2) = binomial(n-2,2) + n - 1 for n > 1 and T(n,3) = binomial(n-3,3) + 2*binomial(n-2,2) for n > 2.
T(2*n-k,k) = A123521(n,k). (End)

A171861 Expansion of x*(1+x+x^2) / ( (x-1)*(x^3+x^2-1) ).

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 18, 25, 34, 46, 62, 83, 111, 148, 197, 262, 348, 462, 613, 813, 1078, 1429, 1894, 2510, 3326, 4407, 5839, 7736, 10249, 13578, 17988, 23830, 31569, 41821, 55402, 73393, 97226, 128798, 170622, 226027, 299423, 396652, 525453, 696078, 922108
Offset: 1

Author

Ed Pegg Jr, Oct 16 2010

Keywords

Comments

Number of wins in Penney's game if the two players start HHT and TTT and HHT beats TTT.
HHT beats TTT 70% of the time. - Geoffrey Critzer, Mar 01 2014

Examples

			a(n) enumerates length n+2 sequences on {H,T} that end in HHT but do not contain the contiguous subsequence TTT.
a(3)=4 because we have: TTHHT, THHHT, HTHHT, HHHHT.
a(4)=6 because we have: TTHHHT, THTHHT, THHHHT, HTTHHT, HTHHHT, HHHHHT. - _Geoffrey Critzer_, Mar 01 2014
		

Crossrefs

Related sequences are A000045 (HHH beats HHT, HTT beats TTH), A006498 (HHH beats HTH), A023434 (HHH beats HTT), A000930 (HHH beats THT, HTH beats HHT), A000931 (HHH beats TTH), A077868 (HHT beats HTH), A002620 (HHT beats HTT), A000012 (HHT beats THH), A004277 (HHT beats THT), A070550 (HTH beats HHH), A000027 (HTH beats HTT), A097333 (HTH beats THH), A040000 (HTH beats TTH), A068921 (HTH beats TTT), A054405 (HTT beats HHH), A008619 (HTT beats HHT), A038718 (HTT beats THT), A128588 (HTT beats TTT).
Cf. A164315 (essentially the same sequence).

Programs

  • Maple
    A171861 := proc(n) option remember; if n <=4 then op(n,[1,2,4,6]); else procname(n-1)+procname(n-2)-procname(n-4) ; end if; end proc:
  • Mathematica
    nn=44;CoefficientList[Series[x(1+x+x^2)/(1-x-x^2+x^4),{x,0,nn}],x] (* Geoffrey Critzer, Mar 01 2014 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,1,1]^(n-1)*[1;2;4;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = a(n-1) +a(n-2) -a(n-4) = A000931(n+10)-3 = A134816(n+6)-3 = A078027(n+12)-3.
a(n) = A164315(n-1). - Alois P. Heinz, Oct 12 2017

A058071 A Fibonacci triangle: triangle T(n,k) = Fibonacci(k+1)*Fibonacci(n-k+1), for n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 2, 2, 3, 5, 3, 4, 3, 5, 8, 5, 6, 6, 5, 8, 13, 8, 10, 9, 10, 8, 13, 21, 13, 16, 15, 15, 16, 13, 21, 34, 21, 26, 24, 25, 24, 26, 21, 34, 55, 34, 42, 39, 40, 40, 39, 42, 34, 55, 89, 55, 68, 63, 65, 64, 65, 63, 68, 55, 89, 144, 89, 110, 102, 105, 104, 104, 105, 102, 110, 89, 144
Offset: 0

Author

N. J. A. Sloane, Nov 24 2000

Keywords

Comments

Or, multiplication table of the positive Fibonacci numbers read by antidiagonals.
Or, triangle of products of nonzero Fibonacci numbers.
Or, a two-dimensional square Fibonacci array read by antidiagonals, with offset 1: T(1,1) = T(1,2) = T(2,1) = T(2,2) = 1; thereafter T(m,n) = max {T(m,n-2) + T(m,n-1), T(m-2,n) + T(m-1,n), T(m-2,n-2) + T(m-1,n-1)}. If "max" is changed to "min" we get A283845. - N. J. A. Sloane, Mar 31 2017
Row sums are A001629 (Fibonacci numbers convolved with themselves.). The main diagonal and first subdiagonal are Fibonacci numbers, for other entries T(n,k) = T(n-1,k) + T(n-2,k). The central numbers form A006498. - Gerald McGarvey, Jun 02 2005
Alternating row sums = (1, 0, 3, 0, 8, ...), given by Fibonacci(2n) if n even, else zero.
Row n = edge-counting vector for the Fibonacci cube F(n+1) embedded in the natural way in the hypercube Q(n+1). - Emanuele Munarini, Apr 01 2008
The augmentation of A058071 is the triangle A193595. To fit the definition of augmented triangle at A103091, it is helpful to represent A058071 using p(n,k)=F(k+1)*F(n+1-k) for 0<=k<=n. - Clark Kimberling, Jul 31 2011
T(n,k) = number of appearances of a(k) in p(n) in the n-th convergent p(n)/q(n) of the formal infinite continued fraction [a(0), a(1), ...]; e.g., p(3) = a(0)*a(1)*a(2)*a(3) + a(0)*a(1) + a(0)*a(3) + a(2)*a(3) + 1. Also, T(n,k) = number of appearances of a(k+1) in q(n+1); e.g., q(3) = a(1)*a(2)*a(3) + a(1) + a(3). - Clark Kimberling, Dec 21 2015
Each row is a palindrome, and the central term of row 2n is the square of the F(n+1), where F = A000045 (Fibonacci numbers). - Clark Kimberling, Dec 21 2015
Also called Hosoya's triangle, after the Japanese chemist Haruo Hosoya (b. 1936). - Amiram Eldar, Jun 10 2021

Examples

			Triangle begins as:
   1;
   1,  1;
   2,  1,  2;
   3,  2,  2,  3;
   5,  3,  4,  3,  5;
   8,  5,  6,  6,  5,  8;
  13,  8, 10,  9, 10,  8, 13;
  21, 13, 16, 15, 15, 16, 13, 21;
  34, 21, 26, 24, 25, 24, 26, 21, 34;
  ...
As a square array:
   1,  1,  2,  3,  5,  8, 13, 21, ...
   1,  1,  2,  3,  5,  8, 13, 21, ...
   2,  2,  4,  6, 10, 16, 26, ...
   3,  3,  6,  9, 15, 24, ...
   5,  5, 10, 15, 25, ...
   8,  8, 16, 24, ...
  13, 13, 26, ...
  21, 21, ...
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • Thomas Koshy, "Fibonacci and Lucas Numbers and Applications", Chap. 15, Hosoya's Triangle, Wiley, New York, 2001.

Programs

  • Haskell
    a058071 n k = a058071_tabl !! n !! k
    a058071_row n = a058071_tabl !! n
    a058071_tabl = map (\fs -> zipWith (*) fs $ reverse fs) a104763_tabl
    -- Reinhard Zumkeller, Aug 15 2013
    
  • Magma
    [Fibonacci(k+1)*Fibonacci(n-k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 06 2022
    
  • Mathematica
    row[n_] := Table[Fibonacci[k]*Fibonacci[n-k+1], {k, 1, n}]; Table[row[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Dec 16 2013 *)
  • PARI
    T(n,k)=fibonacci(k)*fibonacci(n+2-k) \\ Charles R Greathouse IV, Feb 07 2017
    
  • SageMath
    flatten([[fibonacci(k+1)*fibonacci(n-k+1) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 06 2022

Formula

Row n: F(1)*F(n), F(2)*F(n-1), ..., F(n)*F(1).
G.f.: T(x,y) = 1/((1-x-x^2)(1-xy-x^2y^2)). Recurrence: T(n+4,k+2) = T(n+3,k+2) + T(n+3,k+1) + T(n+2,k+2) - T(n+2,k+1) + T(n+2,k) - T(n+1,k+1) - T(n+1,k) - T(n,k). - Emanuele Munarini, Apr 01 2008
T(n,k) = A104763(n+1,k+1) * A104763(n+1,n+1-k). - Reinhard Zumkeller, Aug 15 2013
Column k is the (generalized) Fibonacci sequence having first two terms F(k+1), F(k+1). - Clark Kimberling, Dec 21 2015
From G. C. Greubel, Apr 06 2022: (Start)
T(n,k) = Fibonacci(k+1)*Fibonacci(n-k+1).
Sum_{k=0..n} T(n, k) = A001629(n+2).
Sum_{k=0..floor(n/2)} T(n, k) = A024458(n+1).
Sum_{k=1..n-1} T(n, k) = A004798(n-1), n >= 2.
Sum_{k=0..floor(n/2)} T(n-k, k) = A250111(n+2).
T(n, 0) = A000045(n+1).
T(2*n, n) = A007598(n+1).
T(2*n+1, n) = A001654(n+1).
T(n, n-k) = T(n, k). (End)

Extensions

More terms from James Sellers, Nov 27 2000
Edited by N. J. A. Sloane, Sep 15 2008 at the suggestion of R. J. Mathar
Name edited by G. C. Greubel, Apr 06 2022

A376033 Number A(n,k) of binary words of length n avoiding distance (i+1) between "1" digits if the i-th bit is set in the binary representation of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 3, 8, 1, 2, 4, 5, 16, 1, 2, 3, 6, 8, 32, 1, 2, 4, 4, 9, 13, 64, 1, 2, 3, 8, 6, 15, 21, 128, 1, 2, 4, 5, 12, 9, 25, 34, 256, 1, 2, 3, 6, 7, 18, 13, 40, 55, 512, 1, 2, 4, 4, 8, 11, 27, 19, 64, 89, 1024, 1, 2, 3, 8, 5, 11, 16, 45, 28, 104, 144, 2048
Offset: 0

Author

Alois P. Heinz, Sep 09 2024

Keywords

Comments

Also the number of subsets of [n] avoiding distance (i+1) between elements if the i-th bit is set in the binary representation of k. A(6,3) = 13: {}, {1}, {2}, {3}, {4}, {5}, {6}, {1,4}, {1,5}, {1,6}, {2,5}, {2,6}, {3,6}.
Each column sequence satisfies a linear recurrence with constant coefficients.
The sequence of row n is periodic with period A011782(n) = ceiling(2^(n-1)).

Examples

			A(6,6) = 17: 000000, 000001, 000010, 000011, 000100, 000110, 001000, 001100, 010000, 010001, 011000, 100000, 100001, 100010, 100011, 110000, 110001 because 6 = 110_2 and no two "1" digits have distance 2 or 3.
A(6,7) = 10: 000000, 000001, 000010, 000100, 001000, 010000, 010001, 100000, 100001, 100010.
A(7,7) = 14: 0000000, 0000001, 0000010, 0000100, 0001000, 0010000, 0010001, 0100000, 0100001, 0100010, 1000000, 1000001, 1000010, 1000100.
Square array A(n,k) begins:
     1,  1,   1,  1,   1,  1,  1,  1,   1,  1, ...
     2,  2,   2,  2,   2,  2,  2,  2,   2,  2, ...
     4,  3,   4,  3,   4,  3,  4,  3,   4,  3, ...
     8,  5,   6,  4,   8,  5,  6,  4,   8,  5, ...
    16,  8,   9,  6,  12,  7,  8,  5,  16,  8, ...
    32, 13,  15,  9,  18, 11, 11,  7,  24, 11, ...
    64, 21,  25, 13,  27, 16, 17, 10,  36, 17, ...
   128, 34,  40, 19,  45, 25, 27, 14,  54, 25, ...
   256, 55,  64, 28,  75, 37, 41, 19,  81, 37, ...
   512, 89, 104, 41, 125, 57, 60, 26, 135, 57, ...
		

Crossrefs

Columns k=0-20 give: A000079, A000045(n+2), A006498(n+2), A000930(n+2), A006500, A130137, A079972(n+3), A003269(n+4), A031923(n+1), A263710(n+1), A224809(n+4), A317669(n+4), A351873, A351874, A121832(n+4), A003520(n+4), A208742, A374737, A375977, A375980, A375978.
Rows n=0-2 give: A000012, A007395(k+1), A010702(k+1).
Main diagonal gives A376091.
A(n,2^k-1) gives A141539.
A(2^n-1,2^n-1) gives A376697.
A(n,2^k) gives A209435.

Programs

  • Maple
    h:= proc(n) option remember; `if`(n=0, 1, 2^(1+ilog2(n))) end:
    b:= proc(n, k, t) option remember; `if`(n=0, 1, add(`if`(j=1 and
          Bits[And](t, k)>0, 0, b(n-1, k, irem(2*t+j, h(k)))), j=0..1))
        end:
    A:= (n, k)-> b(n, k, 0):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • PARI
    step(v,b)={vector(#v, i, my(j=(i-1)>>1); if(bittest(i-1,0), if(bitand(b,j)==0, v[1+j], 0), v[1+j] + v[1+#v/2+j]));}
    col(n,k)={my(v=vector(2^(1+logint(k,2))), r=vector(1+n)); v[1]=r[1]=1; for(i=1, n, v=step(v,k); r[1+i]=vecsum(v)); r}
    A(n,k)=if(k==0, 2^n, col(n,k)[n+1]) \\ Andrew Howroyd, Oct 03 2024

Formula

A(n,k) = A(n,k+ceiling(2^(n-1))).
A(n,ceiling(2^(n-1))-1) = n+1.
A(n,ceiling(2^(n-2))) = ceiling(3*2^(n-2)) = A098011(n+2).

A060945 Number of compositions (ordered partitions) of n into 1's, 2's and 4's.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 18, 31, 55, 96, 169, 296, 520, 912, 1601, 2809, 4930, 8651, 15182, 26642, 46754, 82047, 143983, 252672, 443409, 778128, 1365520, 2396320, 4205249, 7379697, 12950466, 22726483, 39882198, 69988378, 122821042, 215535903, 378239143, 663763424, 1164823609
Offset: 0

Author

Len Smiley, May 07 2001

Keywords

Comments

Diagonal sums of A038137. - Paul Barry, Oct 24 2005
From Gary W. Adamson, Oct 28 2010: (Start)
INVERT transform of the aerated Fibonacci sequence (1, 0, 1, 0, 2, 0, 3, 0, 5, ...).
a(n) = term (4,4) in the n-th power of the matrix [0,1,0,0; 0,0,1,0; 0,0,0,1; 1,0,1,1]. (End)
Number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=1, r=3, I={2}. - Vladimir Baltic, Mar 07 2012
Number of compositions of n if the summand 2 is frozen in place or equivalently, if the ordering of the summand 2 does not count. - Gregory L. Simay, Jul 18 2016
a(n) - a(n-2) = number of compositions of n with no 2's = A005251(n+1). - Gregory L. Simay, Jul 18 2016
In general, the number of compositions of n with summand k frozen in place is equal to the number of compositions of n with only summands 1,...,k,2k. - Gregory L. Simay, May 10 2017
In the same way that the sum of any two alternating terms of A006498 produces a term from A000045 (the Fibonacci sequence), so it could be thought of as a "meta-Fibonacci," and the sum of any two alternating terms of A013979 produces a term from A000930 (Narayana’s cows), so it could analogously be called "meta-Narayana’s cows," this sequence embeds (can generate) A000931 (the Padovan sequence), as the odd terms of A000931 are generated by the sum of successive elements (e.g. 1+2=3, 2+3=5, 3+6=9, 6+10=16) and its even terms are generated by the difference of "supersuccessive" (second-order successive or "alternating," separated by a single other term) terms (e.g. 10-3=7, 18-6=12, 31-10=21, 55-18=37) — or, equivalently, adding "supersupersuccessive" terms (separated by 2 other terms, e.g. 1+6=7, 2+10=12, 3+18=21, 6+31=37) — so it could be dubbed the "metaPadovan." - Michael Cohen and Yasuyuki Kachi, Jun 13 2024

Examples

			There are 18=a(6) compositions of 6 with the summand 2 frozen in place: (6), (51), (15), (4[2]), (33), (411), (141), (114), (3[2]1), (1[2]3), ([222]), (3111), (1311), (1131), (1113), ([22]11), ([2]1111), (111111). Equivalently, the position of the summand 2 does not affect the composition count. For example, (321)=(231)=(312) and (123)=(213)=(132).
		

Crossrefs

Cf. A000045 (1's and 2's only), A023359 (all powers of 2)
Same as unsigned version of A077930.
All of A060945, A077930, A181532 are variations of the same sequence. - N. J. A. Sloane, Mar 04 2012

Programs

  • Haskell
    a060945 n = a060945_list !! (n-1)
    a060945_list = 1 : 1 : 2 : 3 : 6 : zipWith (+) a060945_list
       (zipWith (+) (drop 2 a060945_list) (drop 3 a060945_list))
    -- Reinhard Zumkeller, Mar 23 2012
    
  • Magma
    R:=PowerSeriesRing(Integers(), 40);
    Coefficients(R!( 1/(1-x-x^2-x^4) )); // G. C. Greubel, Apr 09 2021
    
  • Maple
    m:= 40; S:= series( 1/(1-x-x^2-x^4), x, m+1);
    seq(coeff(S, x, j), j = 0..m); # G. C. Greubel, Apr 09 2021
  • Mathematica
    LinearRecurrence[{1,1,0,1}, {1,1,2,3}, 39] (* or *)
    CoefficientList[Series[1/(1-x-x^2-x^4), {x, 0, 38}], x] (* Michael De Vlieger, May 10 2017 *)
  • PARI
    N=66; my(x='x+O('x^N));
    Vec(1/(1-x-x^2-x^4))
    /* Joerg Arndt, Oct 21 2012 */
    
  • Sage
    def A060945_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-x-x^2-x^4) ).list()
    A060945_list(40) # G. C. Greubel, Apr 09 2021

Formula

a(n) = a(n-1) + a(n-2) + a(n-4).
G.f.: 1 / (1 - x - x^2 - x^4).
a(n) = Sum_{k=0..floor(n/2)} Sum_{i=0..n-k} C(i, n-k-i)*C(2*i-n+k, 3*k-2*n+2*i). - Paul Barry, Oct 24 2005
a(2n) = A238236(n), a(2n+1) = A097472(n). - Philippe Deléham, Feb 20 2014
a(n) + a(n+1) = A005314(n+2). - R. J. Mathar, Jun 17 2020

Extensions

a(0) = 1 prepended by Joerg Arndt, Oct 21 2012
Showing 1-10 of 61 results. Next