login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045623 Number of 1's in all compositions of n+1.
(Formerly M1412)
57
1, 2, 5, 12, 28, 64, 144, 320, 704, 1536, 3328, 7168, 15360, 32768, 69632, 147456, 311296, 655360, 1376256, 2883584, 6029312, 12582912, 26214400, 54525952, 113246208, 234881024, 486539264, 1006632960, 2080374784, 4294967296 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

Let M_n be the n X n matrix m_(i,j)=2+abs(i-j) then det(M_n)=(-1)^(n-1)*a(n-1) - Benoit Cloitre, May 28 2002

a(n) = number of triangulations of a regular (n+3)-gon in which every triangle shares at least one side with the polygon itself. - David Callan, Mar 25 2004

Number of compositions of j+n, j>n and j the maximum part. E.g. a(4) is derived from the number of compositions of, for example: 54(2), 531(6), 522(3), 5211(12) and 51111(5) giving 2+6+3+12+5=28. - Jon Perry, Sep 13 2005

If X_1,X_2,...,X_n are 2-blocks of a (2n+2)-set X then, for n>=1, a(n+1) is the number of (n+1)-subsets of X intersecting each X_i, (i=1,2,...,n). - Milan R. Janjic (agnus(AT)blic.net), Nov 18 2007

Equals row sums of triangle A152195 [From Gary W. Adamson, Nov 28 2008]

Generated from iterates of M * [1,1,1,...], where M = an infinite triadiagonal matrix with (1,1,1,...) in the main and superdiagonals and (1,0,0,0,...) in the subdiagonal. [From Gary W. Adamson, Jan 04 2009]

Equals row sums of triangle A177992 [From Gary W. Adamson, May 16 2010]

a(n)= number of weak compositions of n with exactly one part equals 0. [From Milan R. Janjic (agnus(AT)blic.net), Jun 27 2010]

Contribution from Johannes W. Meijer, Aug 15 2010: (Start)

An elephant sequence, see A175654. For the corner squares 16 A[5] vectors, with decimal values between 19 and 400, lead to this sequence. For the central square these vectors lead to the companion sequence A045891 (without the first leading 1).

(End)

Equals first finite difference row of A001792: (1, 3, 8, 20, 48, 112,...). [From Gary W. Adamson, Oct 26 2010]

With alternating signs the g.f. is: (-x^2-2*x-1) / (-4*x^2-4*x-1).

Number of 132-avoiding permutations of [n+2] containing exactly one 213 pattern. - David Scambler, Nov 07 2011

a(n) = the number of 1's in all compositions of n+1 = the number of 2's in all compositions of n+2 = the number of 3's in all compositions of n+3 = ...  So the partial sums = A001792. - Geoffrey Critzer, Feb 12 2012

REFERENCES

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

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

F. Ellermann, Illustration of binomial transforms

Milan Janjic, Two Enumerative Functions

Index to sequences with linear recurrences with constant coefficients, signature (4,-4,0).

FORMULA

Sum_{k = 0..n } (k+2)!*binomial(n,k) gives the sequence but with a different offset: 2, 5, 12, 28, 64, 144, 320, 704, 1536, ... - N. J. A. Sloane, Jan 30 2008

Binomial transform of 1,1,2,2,3,3,.... - Paul Barry, Mar 06 2003

a(0)=1, a(n)=(n+3)*2^(n-2), n >= 1. a(n+1) = 2*a(n) + 2^(n-1), n>0.

G.f.: (1-x)^2/((1-2*x)^2). Detlef Pauly (dettodet(AT)yahoo.de), Mar 03 2003

G.f.: 1/(1-x-x^2-x^3-...)^2 - Jon Perry, Jul 04 2004

a(n)=sum_{0<=i_1<=i_2<=n} binomial(n, i_1+i_2) - Benoit Cloitre, Oct 14 2004

a(n)= 2^(n-2)*(n+3) for n>0 - (from Robert G. Wilson v, Jun 27 2005)

a(n)=Sum{k=0..n, C(n, k)*floor((k+2)/2)} - Paul Barry, Mar 06 2003

Equals row sums of A128254. - Gary W. Adamson, Feb 20 2007

a(n+1)-2a(n)= 0, 1, 2, 4, 8, 16, ... = A131577 . - Paul Curtz, May 18 2008

a(n) are the row sums of A198069. - Peter Luschny, Nov 12 2011

EXAMPLE

E.g. a(2)=5 because in the compositions of 3, namely 3,2+1,1+2,1+1+1, we have five 1's altogether.

MAPLE

seq(ceil(1/4*2^n*(n+3)), n=0..50);

MATHEMATICA

Table[ If[n == 0, 1, 2^(n - 2)(n + 3)], {n, 0, 29}] (from Robert G. Wilson v, Jun 27 2005)

PROG

(PARI) a(n)=if(n<1, n==0, (n+3)*2^(n-2))

CROSSREFS

Convolution of A011782.

Cf. A152195, A177992, A001792. [From Gary W. Adamson, Nov 28 2008, May 16 2010, Oct 26 2010]

Sequence in context: A006979 A019301 A006980 * A001410 A019486 A019485

Adjacent sequences:  A045620 A045621 A045622 * A045624 A045625 A045626

KEYWORD

easy,nonn,changed

AUTHOR

Wolfdieter Lang (wolfdieter.lang(AT)physik.uni-karlsruhe.de)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 04:58 EST 2012. Contains 205985 sequences.