cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

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

Views

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

A038137 Reflection of A037027: T(n,m) = U(n,n-m), m=0..n, where U is as in A037027.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 3, 1, 4, 9, 10, 5, 1, 5, 14, 22, 20, 8, 1, 6, 20, 40, 51, 38, 13, 1, 7, 27, 65, 105, 111, 71, 21, 1, 8, 35, 98, 190, 256, 233, 130, 34, 1, 9, 44, 140, 315, 511, 594, 474, 235, 55, 1, 10, 54, 192, 490, 924, 1295, 1324, 942, 420, 89, 1, 11, 65, 255
Offset: 0

Views

Author

Keywords

Comments

Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (2,2). - Joerg Arndt, Jul 01 2011
The n-th diagonal D(n) = {T(n,0), T(n+1,1), ..., T(n+m,m), ...} of the triangle has generating function F(x) = 1/(1 - x - x^2)^(n+1) for n = 0,1,2,.... - L. Edson Jeffery, Mar 20 2011
Let p(n,x) denote the Fibonacci polynomial, defined by p(1,x) = 1, p(2,x) = x, and p(n,x) = x*p(n-1,x) + p(n-2,x) for n >= 3. Let q(n,x) be the numerator polynomial of the rational function p(n, 1 + 1/x). The coefficients of the polynomial q(n,x) are given by the (n-1)-th row of T(n,k). E.g., p(5,x) = 1 + 3*x^2 + x^4 gives q(5,x) = 1 + 4*x + 9*x^2 + 10*x^2 + 5*x^4. - Clark Kimberling, Nov 04 2013

Examples

			Triangle T(n,k) (with rows n >= 0 and columns 0 <= k <= n) begins
  1;
  1, 1;
  1, 2,  2;
  1, 3,  5,  3;
  1, 4,  9, 10,   5;
  1, 5, 14, 22,  20,   8;
  1, 6, 20, 40,  51,  38, 13;
  1, 7, 27, 65, 105, 111, 71, 21;
  ...
		

Crossrefs

Row sums are Pell numbers A000129.
Diagonal sums are unsigned version of A077930.

Programs

  • Haskell
    a038137 n k = a038137_tabl !! n !! k
    a038137_row n = a038137_tabl !! n
    a038137_tabl = map reverse a037027_tabl
    -- Reinhard Zumkeller, Jul 08 2012

Formula

From Paul Barry, Oct 24 2005: (Start)
G.f.: 1/(1 - x - x*y - x^2*y^2).
T(n,k) = Sum_{j=0..n} C((n+j)/2, j) * (1 + (-1)^(n+j)) * C(j, n-k)/2. (End)
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-2), T(n,k) = 0 if n < 0 or if n < k, and T(0,0) = 1. - Philippe Deléham, Nov 30 2006
Sum_{k=0..n} (-1)^k*T(n,k) = A059841(n). - Philippe Deléham, Nov 30 2006
T(n,k) = A208336(n+1,k).- Philippe Deléham, Apr 05 2012

Extensions

Title corrected by L. Edson Jeffery, Apr 23 2011
Corrected by Philippe Deléham, Apr 05 2012

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

Original entry on oeis.org

0, 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
Offset: 0

Views

Author

Gary W. Adamson, Oct 28 2010

Keywords

Comments

Essentially the same as A060945: a(0)=0 and a(n)=A060945(n-1) for n>=1.
lim(n->infinity) a(n+1)/a(n) = A109134 = 1.754877666..., the square of the absolute value of one of the complex-valued roots of the characteristic polynomial. [R. J. Mathar, Nov 01 2010]
The Ze4 sums, see A180662 for the definition of these sums, of the ‘Races with Ties’ triangle A035317 lead to this sequence. [Johannes W. Meijer, Jul 20 2011]

Examples

			a(7) = 18 = a(6) + a(5) + a(3) = 10 + 6 + 2.
a(7) = 18 = (1 0, 2, 0, 2, 0, 3) dot (10, 6, 3, 2, 1, 1, 1) = (10 + 3 + 2 + 3).
		

Crossrefs

All of A060945, A077930, A181532 are variations of the same sequence. - N. J. A. Sloane, Mar 04 2012

Programs

  • Mathematica
    LinearRecurrence[{1,1,0,1},{0,1,1,2},40] (* Harvey P. Dale, Jun 20 2015 *)

Formula

a(0) = 0, a(1) = 1, a(2) = 1, a(3) = 2; a(n) = a(n-1) + a(n-2) + a(n-4).
G.f.: x/(1-x-x^2-x^4). [Franklin T. Adams-Watters, Feb 25 2011]
a(n) = |A077930(n)| = ( |A056016(n+2)|-(-1)^n)/5. [R. J. Mathar, Oct 29 2010]
a(n) = A060945(n-1), n>1. [R. J. Mathar, Nov 03 2010]

Extensions

Values from a(9) on changed by R. J. Mathar, Oct 29 2010
Edited and a(0) added by Franklin T. Adams-Watters, Feb 25 2011

A097472 Number of different candle trees having a total of m edges.

Original entry on oeis.org

1, 3, 10, 31, 96, 296, 912, 2809, 8651, 26642, 82047, 252672, 778128, 2396320, 7379697, 22726483, 69988378, 215535903, 663763424, 2044122936, 6295072048, 19386276329, 59701891739, 183857684514, 566207320575, 1743689586432
Offset: 0

Views

Author

Alexander Malkis, Sep 18 2004

Keywords

Comments

A candle tree is a graph on the plane square lattice Z X Z whose edges have length one with the following properties: (a) It contains a line segment ("trunk") of length from 0 to m on the vertical axis, its lowest node is at the origin. (b) It contains horizontal line segments ("branches"); each of them intersects the trunk. (c) Each branch is allowed to have "candles", which are vertical edges of length 1, whose lower node is on a branch.
Row sums of triangle in A238241. - Philippe Deléham, Feb 21 2014

Crossrefs

Bisection of A060945 and |A077930|.

Programs

  • Mathematica
    CoefficientList[Series[1/(x^4+2x^3-x^2-3x+1),{x,0,30}],x] (* or *) LinearRecurrence[{3,1,-2,-1},{1,3,10,31},30] (* Harvey P. Dale, Jun 14 2011 *)
  • Maxima
    a(n):=sum(sum(binomial(k,n-m-k+1)*binomial(k+2*m-1,2*m-1),k,1,n-m+1),m,1,n)+1; /* Vladimir Kruchinin, May 12 2011 */
    
  • PARI
    a(n)=sum(m=1,n,sum(k=1,n-m+1,binomial(k,n-m-k+1)*binomial(k+2*m-1,2*m-1))) \\ Charles R Greathouse IV, Jun 17 2013

Formula

a(n) = Sum_{s, d, k>=0 with s+d+k=m} binomial(s+2d+1, s)*binomial(s, k);
generating function = 1/((1-x)*(1-2*x-3*x^2-x^3)).
a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4);
a(n) = 1 + Sum_{m=1..n} Sum_{k=1..n-m+1} binomial(k, n-m-k+1)*binomial(k+2*m-1,2*m-1). - Vladimir Kruchinin, May 12 2011
a(n) = Sum_{k=0..n} A238241(n,k). - Philippe Deléham, Feb 21 2014
a(n) - a(n-1) = A218836(n). - R. J. Mathar, Jun 17 2020
Showing 1-4 of 4 results.