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

A140962 Negative values of the inverse binomial transform of A045883.

Original entry on oeis.org

0, -1, -1, -3, -1, -7, 3, -19, 23, -63, 107, -235, 447, -919, 1811, -3651, 7271, -14575, 29115, -58267, 116495, -233031, 466019, -932083, 1864119, -3728287, 7456523, -14913099, 29826143, -59652343, 119304627, -238609315, 477218567, -954437199
Offset: 0

Views

Author

Paul Curtz, Jul 27 2008

Keywords

Comments

The inverse binomial transform of A045883 is 0,1,1,3,1,7,...

Programs

  • Magma
    [-(1/9)-(2/3)*n+(1/9)*(-2)^n: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
  • Mathematica
    LinearRecurrence[{0,3,-2},{0,-1,-1},50] (* Paolo Xausa, Nov 14 2023 *)

Formula

a(n+1) - a(n) = (-1)^(n+1)*A078008(n).
a(n+1) - a(n) = 2*(-1)^n*A001045(n-1), n > 0.
a(n) = 3*a(n-2) - 2*a(n-3).
G.f.: -x*(1+x)/((1+2*x)*(1-x)^2). - R. J. Mathar, Nov 11 2008

Extensions

Edited and extended by R. J. Mathar, Nov 11 2008

A001787 a(n) = n*2^(n-1).

Original entry on oeis.org

0, 1, 4, 12, 32, 80, 192, 448, 1024, 2304, 5120, 11264, 24576, 53248, 114688, 245760, 524288, 1114112, 2359296, 4980736, 10485760, 22020096, 46137344, 96468992, 201326592, 419430400, 872415232, 1811939328, 3758096384, 7784628224, 16106127360, 33285996544
Offset: 0

Views

Author

Keywords

Comments

Number of edges in an n-dimensional hypercube.
Number of 132-avoiding permutations of [n+2] containing exactly one 123 pattern. - Emeric Deutsch, Jul 13 2001
Number of ways to place n-1 nonattacking kings on a 2 X 2(n-1) chessboard for n >= 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 22 2001
Arithmetic derivative of 2^n: a(n) = A003415(A000079(n)). - Reinhard Zumkeller, Feb 26 2002
(-1) times the determinant of matrix A_{i,j} = -|i-j|, 0 <= i,j <= n.
a(n) is the number of ones in binary numbers 1 to 111...1 (n bits). a(n) = A000337(n) - A000337(n-1) for n = 2,3,... . - Emeric Deutsch, May 24 2003
The number of 2 X n 0-1 matrices containing n+1 1's and having no zero row or column. The number of spanning trees of the complete bipartite graph K(2,n). This is the case m = 2 of K(m,n). See A072590. - W. Edwin Clark, May 27 2003
Binomial transform of 0,1,2,3,4,5,... (A001477). Without the initial 0, binomial transform of odd numbers.
With an additional leading zero, [0,0,1,4,...] this is the binomial transform of the integers repeated A004526. Its formula is then (2^n*(n-1) + 0^n)/4. - Paul Barry, May 20 2003
Number of zeros in all different (n+1)-bit integers. - Ralf Stephan, Aug 02 2003
From Lekraj Beedassy, Jun 03 2004: (Start)
Final element of a summation table (as opposed to a difference table) whose first row consists of integers 0 through n (or first n+1 nonnegative integers A001477); illustrating the case n=5:
0 1 2 3 4 5
1 3 5 7 9
4 8 12 16
12 20 28
32 48
80
and the final element is a(5)=80. (End)
This sequence and A001871 arise in counting ordered trees of height at most k where only the rightmost branch at the root actually achieves this height and the count is by the number of edges, with k = 3 for this sequence and k = 4 for A001871.
Let R be a binary relation on the power set P(A) of a set A having n = |A| elements such that for all elements x,y of P(A), xRy if x is a proper subset of y and there are no z in P(A) such that x is a proper subset of z and z is a proper subset of y. Then a(n) = |R|. - Ross La Haye, Sep 21 2004
Number of 2 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1) and (10;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2, j1 < j2 and these elements are in same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004
Number of subsequences 00 in all binary words of length n+1. Example: a(2)=4 because in 000,001,010,011,100,101,110,111 the sequence 00 occurs 4 times. - Emeric Deutsch, Apr 04 2005
If you expand the n-factor expression (a+1)*(b+1)*(c+1)*...*(z+1), there are a(n) variables in the result. For example, the 3-factor expression (a+1)*(b+1)*(c+1) expands to abc+ab+ac+bc+a+b+c+1 with a(3) = 12 variables. - David W. Wilson, May 08 2005
An inverse Chebyshev transform of n^2, where g(x)->(1/sqrt(1-4*x^2))*g(x*c(x^2)), c(x) the g.f. of A000108. - Paul Barry, May 13 2005
Sequences A018215 and A058962 interleaved. - Graeme McRae, Jul 12 2006
The number of never-decreasing positive integer sequences of length n with a maximum value of 2*n. - Ben Paul Thurston, Nov 13 2006
Total size of all the subsets of an n-element set. For example, a 2-element set has 1 subset of size 0, 2 subsets of size 1 and 1 of size 2. - Ross La Haye, Dec 30 2006
Convolution of the natural numbers [A000027] and A045623 beginning [0,1,2,5,...]. - Ross La Haye, Feb 03 2007
If M is the matrix (given by rows) [2,1;0,2] then the sequence gives the (1,2) entry in M^n. - Antonio M. Oller-Marcén, May 21 2007
If X_1,X_2,...,X_n is a partition of a 2n-set X into 2-blocks then, for n > 0, a(n) is equal to the number of (n+1)-subsets of X intersecting each X_i (i=1,2,...,n). - Milan Janjic, Jul 21 2007
Number of n-permutations of 3 objects u,v,w, with repetition allowed, containing exactly one u. Example: a(2)=4 because we have uv, vu, uw and wu. - Zerinvary Lajos, Dec 27 2007
A member of the family of sequences defined by a(n) = n*[c(1)*...*c(r)]^(n-1); c(i) integer. This sequence has c(1)=2, A027471 has c(1)=3. - Ctibor O. Zizka, Feb 23 2008
a(n) is the number of ways to split {1,2,...,n-1} into two (possibly empty) complementary intervals {1,2,...,i} and {i+1,i+2,...,n-1} and then select a subset from each interval. - Geoffrey Critzer, Jan 31 2009
Equals the Jacobsthal sequence A001045 convolved with A003945: (1, 3, 6, 12, ...). - Gary W. Adamson, May 23 2009
Starting with offset 1 = A059570: (1, 2, 6, 14, 34, ...) convolved with (1, 2, 2, 2, ...). - Gary W. Adamson, May 23 2009
Equals the first left hand column of A167591. - Johannes W. Meijer, Nov 12 2009
The number of tatami tilings of an n X n square with n monomers is n*2^(n-1). - Frank Ruskey, Sep 25 2010
Under T. D. Noe's variant of the hypersigma function, this sequence gives hypersigma(2^n): a(n) = A191161(A000079(n)). - Alonso del Arte, Nov 04 2011
Number of Dyck (n+2)-paths with exactly one valley at height 1 and no higher valley. - David Scambler, Nov 07 2011
Equals triangle A059260 * A016777 as a vector, where A016777 = (3n + 1): [1, 4, 7, 10, 13, ...]. - Gary W. Adamson, Mar 06 2012
Main transitions in systems of n particles with spin 1/2 (see A212697 with b=2). - Stanislav Sykora, May 25 2012
Let T(n,k) be the triangle with (first column) T(n,1) = 2*n-1 for n >= 1, otherwise T(n,k) = T(n,k-1) + T(n-1,k-1), then a(n) = T(n,n). - J. M. Bergot, Jan 17 2013
Sum of all parts of all compositions (ordered partitions) of n. The equivalent sequence for partitions is A066186. - Omar E. Pol, Aug 28 2013
Starting with a(1)=1: powers of 2 (A000079) self-convolved. - Bob Selcoe, Aug 05 2015
Coefficients of the series expansion of the normalized Schwarzian derivative -S{p(x)}/6 of the polynomial p(x) = -(x-x1)*(x-x2) with x1 + x2 = 1 (cf. A263646). - Tom Copeland, Nov 02 2015
a(n) is the number of North-East lattice paths from (0,0) to (n+1,n+1) that have exactly one east step below y = x-1 and no east steps above y = x+1. Details can be found in Pan and Remmel's link. - Ran Pan, Feb 03 2016
Also the number of maximal and maximum cliques in the n-hypercube graph for n > 0. - Eric W. Weisstein, Dec 01 2017
Let [n]={1,2,...,n}; then a(n-1) is the total number of elements missing in proper subsets of [n] that contain n to form [n]. For example, for n = 3, a(2) = 4 since the proper subsets of [3] that contain 3 are {3}, {1,3}, {2,3} and the total number of elements missing in these subsets to form [3] is 4: 2 in the first subset, 1 in the second, and 1 in the third. - Enrique Navarrete, Aug 08 2020
Number of 3-permutations of n elements avoiding the patterns 132, 231. See Bonichon and Sun. - Michel Marcus, Aug 19 2022

Examples

			a(2)=4 since 2314, 2341,3124 and 4123 are the only 132-avoiding permutations of 1234 containing exactly one increasing subsequence of length 3.
x + 4*x^2 + 12*x^3 + 32*x^4 + 80*x^5 + 192*x^6 + 448*x^7 + ...
a(5) = 1*0 + 5*1 + 10*2 + 10*3 + 5*4 + 1*5 = 80, with 1,5,10,10,5,1 the 5th row of Pascal's triangle. - _J. M. Bergot_, Apr 29 2014
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 796.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 131.
  • Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 282.
  • 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

Three other versions, essentially identical, are A085750, A097067, A118442.
Partial sums of A001792.
A058922(n+1) = 4*A001787(n).
Equals A090802(n, 1).
Column k=1 of A038207.
Row sums of A003506, A322427, A322428.

Programs

  • Haskell
    a001787 n = n * 2 ^ (n - 1)
    a001787_list = zipWith (*) [0..] $ 0 : a000079_list
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Magma
    [n*2^(n-1): n in [0..40]]; // Vincenzo Librandi, Feb 04 2016
    
  • Maple
    spec := [S, {B=Set(Z, 0 <= card), S=Prod(Z, B, B)}, labeled]: seq(combstruct[count](spec, size=n), n=0..29); # Zerinvary Lajos, Oct 09 2006
    A001787:=1/(2*z-1)^2; # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[Sum[Binomial[n, i] i, {i, 0, n}], {n, 0, 30}] (* Geoffrey Critzer, Mar 18 2009 *)
    f[n_] := n 2^(n - 1); f[Range[0, 40]] (* Vladimir Joseph Stephan Orlovsky, Feb 09 2011 *)
    Array[# 2^(# - 1) &, 40, 0] (* Harvey P. Dale, Jul 26 2011 *)
    Join[{0}, Table[n 2^(n - 1), {n, 20}]] (* Eric W. Weisstein, Dec 01 2017 *)
    Join[{0}, LinearRecurrence[{4, -4}, {1, 4}, 20]] (* Eric W. Weisstein, Dec 01 2017 *)
    CoefficientList[Series[x/(-1 + 2 x)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Dec 01 2017 *)
  • PARI
    {a(n) = if( n<0, 0, n * 2^(n-1))}
    
  • PARI
    concat(0, Vec(x/(1-2*x)^2 + O(x^50))) \\ Altug Alkan, Nov 03 2015
    
  • Python
    def A001787(n): return n*(1<Chai Wah Wu, Nov 14 2022

Formula

a(n) = Sum_{k=1..n} k*binomial(n, k). - Benoit Cloitre, Dec 06 2002
E.g.f.: x*exp(2x). - Paul Barry, Apr 10 2003
G.f.: x/(1-2*x)^2.
G.f.: x / (1 - 4*x / (1 + x / (1 - x))). - Michael Somos, Apr 07 2012
A108666(n) = Sum_{k=0..n} binomial(n, k)^2 * a(n). - Michael Somos, Apr 07 2012
PSumSIGN transform of A053220. PSumSIGN transform is A045883. Binomial transform is A027471(n+1). - Michael Somos, Jul 10 2003
Starting at a(1)=1, INVERT transform is A002450, INVERT transform of A049072, MOBIUS transform of A083413, PSUM transform is A000337, BINOMIAL transform is A081038, BINOMIAL transform of A005408. - Michael Somos, Apr 07 2012
a(n) = 2*a(n-1)+2^(n-1).
a(2*n) = n*4^n, a(2*n+1) = (2*n+1)4^n.
G.f.: x/det(I-x*M) where M=[1,i;i,1], i=sqrt(-1). - Paul Barry, Apr 27 2005
Starting 1, 1, 4, 12, ... this is 0^n + n2^(n-1), the binomial transform of the 'pair-reversed' natural numbers A004442. - Paul Barry, Jul 24 2003
Convolution of [1, 2, 4, 8, ...] with itself. - Jon Perry, Aug 07 2003
The signed version of this sequence, n(-2)^(n-1), is the inverse binomial transform of n(-1)^(n-1) (alternating sign natural numbers). - Paul Barry, Aug 20 2003
a(n-1) = (Sum_{k=0..n} 2^(n-k-1)*C(n-k, k)*C(1,(k+1)/2)*(1-(-1)^k)/2) - 0^n/4. - Paul Barry, Oct 15 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)(n-2k)^2. - Paul Barry, May 13 2005
a(n+2) = A049611(n+2) - A001788(n).
a(n) = n! * Sum_{k=0..n} 1/((k - 1)!(n - k)!). - Paul Barry, Mar 26 2003
a(n+1) = Sum_{k=0..n} 4^k * A109466(n,k). - Philippe Deléham, Nov 13 2006
Row sums of A130300 starting (1, 4, 12, 32, ...). - Gary W. Adamson, May 20 2007
Equals row sums of triangle A134083. Equals A002064(n) + (2^n - 1). - Gary W. Adamson, Oct 07 2007
a(n) = 4*a(n-1) - 4*a(n-2), a(0)=0, a(1)=1. - Philippe Deléham, Nov 16 2008
Sum_{n>0} 1/a(n) = 2*log(2). - Jaume Oliver Lafont, Feb 10 2009
a(n) = A000788(A000225(n)) = A173921(A000225(n)). - Reinhard Zumkeller, Mar 04 2010
a(n) = n * A011782(n). - Omar E. Pol, Aug 28 2013
a(n-1) = Sum_{t_1+2*t_2+...+n*t_n=n} (t_1+t_2+...+t_n-1)*multinomial(t_1+t_2 +...+t_n,t_1,t_2,...,t_n). - Mircea Merca, Dec 06 2013
a(n+1) = Sum_{r=0..n} (2*r+1)*C(n,r). - J. M. Bergot, Apr 07 2014
a(n) = A007283(n)*n/6. - Enxhell Luzhnica, Apr 16 2016
a(n) = (A000225(n) + A000337(n))/2. - Anton Zakharov, Sep 17 2016
Sum_{n>0} (-1)^(n+1)/a(n) = 2*log(3/2) = 2*A016578. - Ilya Gutkovskiy, Sep 17 2016
a(n) = Sum_{k=0..n-1} Sum_{i=0..n-1} (i+1) * C(k,i). - Wesley Ivan Hurt, Sep 21 2017
a(n) = Sum_{i=1..n} Sum_{j=1..n} phi(i)*binomial(n, i*j). - Ridouane Oudra, Feb 17 2024

A238343 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k descents, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 1, 0, 2, 0, 0, 3, 1, 0, 0, 5, 3, 0, 0, 0, 7, 9, 0, 0, 0, 0, 11, 19, 2, 0, 0, 0, 0, 15, 41, 8, 0, 0, 0, 0, 0, 22, 77, 29, 0, 0, 0, 0, 0, 0, 30, 142, 81, 3, 0, 0, 0, 0, 0, 0, 42, 247, 205, 18, 0, 0, 0, 0, 0, 0, 0, 56, 421, 469, 78, 0, 0, 0, 0, 0, 0, 0, 0, 77, 689, 1013, 264, 5, 0, 0, 0, 0, 0, 0, 0, 0, 101, 1113, 2059, 786, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Counting ascents gives the same triangle.
For n > 0, also the number of compositions of n with k + 1 maximal weakly increasing runs. - Gus Wiseman, Mar 23 2020

Examples

			Triangle starts:
00:    1;
01:    1,    0;
02:    2,    0,    0;
03:    3,    1,    0,    0;
04:    5,    3,    0,    0,   0;
05:    7,    9,    0,    0,   0, 0;
06:   11,   19,    2,    0,   0, 0, 0;
07:   15,   41,    8,    0,   0, 0, 0, 0;
08:   22,   77,   29,    0,   0, 0, 0, 0, 0;
09:   30,  142,   81,    3,   0, 0, 0, 0, 0, 0;
10:   42,  247,  205,   18,   0, 0, 0, 0, 0, 0, 0;
11:   56,  421,  469,   78,   0, 0, 0, 0, 0, 0, 0, 0;
12:   77,  689, 1013,  264,   5, 0, 0, 0, 0, 0, 0, 0, 0;
13:  101, 1113, 2059,  786,  37, 0, 0, 0, 0, 0, 0, 0, 0, 0;
14:  135, 1750, 4021, 2097, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
15:  176, 2712, 7558, 5179, 751, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
...
From _Gus Wiseman_, Mar 23 2020: (Start)
Row n = 5 counts the following compositions:
  (5)          (3,2)
  (1,4)        (4,1)
  (2,3)        (1,3,1)
  (1,1,3)      (2,1,2)
  (1,2,2)      (2,2,1)
  (1,1,1,2)    (3,1,1)
  (1,1,1,1,1)  (1,1,2,1)
               (1,2,1,1)
               (2,1,1,1)
(End)
		

Crossrefs

T(3n,n) gives A000045(n+1).
T(3n+1,n) = A136376(n+1).
Row sums are A011782.
Compositions by length are A007318.
The version for co-runs or levels is A106356.
The case of partitions (instead of compositions) is A133121.
The version for runs is A238279.
The version without zeros is A238344.
The version for weak ascents is A333213.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, expand(
           add(b(n-j, j)*`if`(j (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):
    seq(T(n), n=0..20);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n-j, j]*If[jJean-François Alcover, Jan 08 2015, translated from Maple *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],n==0||Length[Split[#,LessEqual]]==k+1&]],{n,0,9},{k,0,n}] (* Gus Wiseman, Mar 23 2020 *)

Formula

Sum_{k=0..n} k * T(n,k) = A045883(n-2) for n>=2.

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

Original entry on oeis.org

0, 1, 6, 27, 108, 405, 1458, 5103, 17496, 59049, 196830, 649539, 2125764, 6908733, 22320522, 71744535, 229582512, 731794257, 2324522934, 7360989291, 23245229340, 73222472421, 230127770466, 721764371007, 2259436291848
Offset: 1

Views

Author

Keywords

Comments

Arithmetic derivative of 3^(n-1): a(n) = A003415(A000244(n-1)). - Reinhard Zumkeller, Feb 26 2002 [Offset corrected by Jianing Song, May 28 2024]
Binomial transform of A053220(n+1) is a(n+2). Binomial transform of A001787 is a(n+1). Binomial transform of A045883(n-1). - Michael Somos, Jul 10 2003
If X_1,X_2,...,X_n are 3-blocks of a (3n+1)-set X then, for n >= 1, a(n+2) is the number of (n+1)-subsets of X intersecting each X_i, (i=1,2,...,n). > - Milan Janjic, Nov 18 2007
Let S be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xSy if x is a subset of y. Then a(n+1) = the sum of the differences in size (i.e., |y|-|x|) for all (x, y) of S. - Ross La Haye, Nov 19 2007
Number of substrings 00 (or 11, or 22) in all ternary words of length n: a(3) = 6 because we have 000, 001, 002, 100, 200 (with 000 contributing two substrings). - Darrell Minor, Jul 17 2025

Crossrefs

Second column of A027465.
Partial sums of A081038.
Cf. A006234.

Programs

  • GAP
    List([1..40], n-> (n-1)*3^(n-2)); # Muniru A Asiru, Jul 15 2018
    
  • Magma
    [(n-1)*3^(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 09 2011
    
  • Maple
    seq((n-1)*3^(n-2), n=1..40); # Muniru A Asiru, Jul 15 2018
  • Mathematica
    Table[(n-1)3^(n-2),{n,30}] (* or *)
    LinearRecurrence[{6,-9},{0,1},30] (* Harvey P. Dale, Apr 14 2016 *)
    Range[0, 24]! CoefficientList[ Series[x*Exp[3 x], {x, 0, 24}], x] (* Robert G. Wilson v, Aug 03 2018 *)
  • PARI
    a(n)=if(n<1, 0, (n-1)*3^(n-2));
    
  • Sage
    [3^(n-2)*(n-1) for n in (1..30)] # G. C. Greubel, May 20 2021

Formula

From Wolfdieter Lang: (Start)
G.f.: (x/(1-3*x))^2.
E.g.f.: (1 + (3*x-1)*exp(3*x))/9.
a(n) = 3^(n-2)*(n-1) (convolution of A000244, powers of 3, with itself). (End)
a(n) = 6*a(n-1) - 9*a(n-2), n > 2, a(1)=0, a(2)=1. - Barry E. Williams, Jan 13 2000
a(n) = A036290(n-1)/3, for n>0. - Paul Barry, Feb 06 2004 [corrected by Jerzy R Borysowicz, Apr 03 2025]
a(n) = Sum_{k=0..n} 3^(n-k)*binomial(n-k+1, k)*binomial(1, (k+1)/2)*(1-(-1)^k)/2.
From Paul Barry, Feb 15 2005: (Start)
a(n) = (1/3)*Sum_{k=0..2n} T(n, k)*k, where T(n, k) is given by A027907.
a(n) = (1/3)*Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j+k).
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j-k).
a(n+1) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*(j+k+1). (End)
Sum_{n>=2} 1/a(n) = 3*log(3/2). - Jaume Oliver Lafont, Sep 19 2009
a(n) = 3*a(n-1) + 3^(n-2) (with a(1)=0). - Vincenzo Librandi, Dec 30 2010
Sum_{n>=2} (-1)^n/a(n) = 3*log(4/3). - Amiram Eldar, Oct 28 2020

Extensions

Edited by Michael Somos, Jul 10 2003

A073371 Convolution of A001045(n+1) (generalized (1,2)-Fibonacci), n >= 0, with itself.

Original entry on oeis.org

1, 2, 7, 16, 41, 94, 219, 492, 1101, 2426, 5311, 11528, 24881, 53398, 114083, 242724, 514581, 1087410, 2291335, 4815680, 10097401, 21126862, 44117867, 91963996, 191384541, 397682154, 825190479, 1710033272, 3539371201, 7317351686
Offset: 0

Views

Author

Wolfdieter Lang, Aug 02 2002

Keywords

Comments

PSumSIGN transform of A045883(n-1). - Michael Somos, Jul 10 2003
Numbers of the form ((6*m+4)*2^m + (-1)^(m-1)*(3*m+4))/27. - Artur Jasinski, Feb 09 2007
With [0, 0, 0] prepended, this is an "autosequence" of the first kind, whose companion is [0, 0, 2, 3, 12, 25, 66, ...], that is A099429. - Jean-François Alcover, Jul 10 2022

Crossrefs

Second (m=1) column of triangle A073370.

Programs

  • Magma
    [((5+3*n)*2^(n+2) + (-1)^n*(7+3*n))/27: n in [0..40]]; // G. C. Greubel, Sep 28 2022
    
  • Mathematica
    Table[((6n+4)*2^n + (-1)^(n-1)(3n+4))/27, {n, 100}] (* Artur Jasinski, Feb 09 2007 *)
  • PARI
    a(n) = if(n<-3, 0, ((5+3*n)*2^(n+2)+(7+3*n)*(-1)^n)/27)
    
  • SageMath
    def A073371(n): return ((5+3*n)*2^(n+2) + (-1)^n*(7+3*n))/27
    [A073371(n) for n in range(40)] # G. C. Greubel, Sep 28 2022

Formula

a(n) = Sum_{k=0..n} b(k) * b(n-k), where b(k) = A001045(k+1).
a(n) = Sum_{k=0..floor(n/2)} (n-k+1) * binomial(n-k, k) * 2^k.
a(n) = ((n+1)*U(n+1) + 4*(n+2)*U(n))/9 with U(n) = A001045(n+1), n>=0.
G.f.: 1/(1 - (1+2*x)*x)^2.
G.f.: 1/((1+x)*(1-2*x))^2.
a(n) = ((5+3*n)*2^(n+2) + (7+3*n)*(-1)^n)/27.
a(n) = ((6*n+4)*2^(n) + (-1)^(n-1)*(3*n+4))/27. - Artur Jasinski, Feb 09 2007
E.g.f.: (1/27)*(4*(5+6*x)*exp(2*x) + (7-3*x)*exp(-x)). - G. C. Greubel, Sep 28 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 08 2007

A238344 Irregular triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k descents, n>=0, 0<=k<=floor(n/3).

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 3, 7, 9, 11, 19, 2, 15, 41, 8, 22, 77, 29, 30, 142, 81, 3, 42, 247, 205, 18, 56, 421, 469, 78, 77, 689, 1013, 264, 5, 101, 1113, 2059, 786, 37, 135, 1750, 4021, 2097, 189, 176, 2712, 7558, 5179, 751, 8, 231, 4128, 13780, 11998, 2558, 73, 297, 6208, 24440, 26400, 7762, 429
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Same as A238343, with zeros omitted.
Row sums are A011782.
T(3n,n) = A000045(n+1).
T(3n+1,n) = A136376(n+1).

Examples

			Triangle starts:
00:    1;
01:    1;
02:    2;
03:    3,     1;
04:    5,     3;
05:    7,     9;
06:   11,    19,      2;
07:   15,    41,      8;
08:   22,    77,     29;
09:   30,   142,     81,      3;
10:   42,   247,    205,     18;
11:   56,   421,    469,     78;
12:   77,   689,   1013,    264,      5;
13:  101,  1113,   2059,    786,     37;
14:  135,  1750,   4021,   2097,    189;
15:  176,  2712,   7558,   5179,    751,     8;
16:  231,  4128,  13780,  11998,   2558,    73;
17:  297,  6208,  24440,  26400,   7762,   429;
18:  385,  9201,  42358,  55593,  21577,  1945,  13;
19:  490, 13502,  71867, 112814,  55867,  7465, 139;
20:  627, 19585, 119715, 221639, 136478, 25317, 927;
...
		

Crossrefs

Cf. A045883.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, expand(
           add(b(n-j, j)*`if`(j (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..20);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Expand[Sum[b[n-j, j]*If[jJean-François Alcover, Feb 11 2015, after Maple *)

Formula

Sum_{k=0..floor(n/3)} k * T(n,k) = A045883(n-2) for n>=2.

A124760 Number of rises for compositions in standard order.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
A114994 seems to give the positions of zeros. - Antti Karttunen, Jul 09 2017
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. a(n) is one fewer than the number of maximal weakly decreasing runs in this composition. Alternatively, a(n) is the number of strict ascents in the same composition. For example, the weakly decreasing runs of the 1234567th composition are ((3,2,1),(2,2,1),(2),(5,1,1,1)), so a(1234567) = 4 - 1 = 3. The 3 strict ascents together with the weak descents are: 3 >= 2 >= 1 < 2 >= 2 >= 1 < 2 < 5 >= 1 >= 1 >= 1. - Gus Wiseman, Apr 08 2020

Examples

			Composition number 11 is 2,1,1; 2>=1>=1, so a(11) = 0.
The table starts:
  0
  0
  0 0
  0 0 1 0
  0 0 0 0 1 1 1 0
  0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0
  0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 0
		

Crossrefs

Cf. A066099, A124761, A124762, A124763, A124764, A011782 (row lengths), A045883 (row sums), A233249, A333213, A333380.
Compositions of n with k strict ascents are A238343.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Weakly decreasing compositions are A114994.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Weakly increasing compositions are A225620.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Constant compositions are A272919.
- Normal compositions are A333217.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- Anti-runs are A333489.
- Runs-resistance is A333628.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Select[Partition[stc[n],2,1],Less@@#&]],{n,0,100}] (* Gus Wiseman, Apr 08 2020 *)
  • PARI
    A066099row(n) = {my(v=vector(n), j=0, k=0); while(n>0, k++; if(n%2==1, v[j++]=k; k=0); n\=2);  vector(j, i, v[j-i+1]); } \\ Returns empty for n=0. - From code of Franklin T. Adams-Watters in A066099.
    A124760(n) = { my(v=A066099row(n), r=0); for(i=2,length(v),r += (v[i]>v[i-1])); (r); }; \\ Antti Karttunen, Jul 09 2017

Formula

For a composition b(1),...,b(k), a(n) = Sum_{i = 1 .. k-1} [b(i+1) > b(i)], where [ ] is Iverson bracket, giving in this case 1 only if b(i+1) > b(i), and 0 otherwise. - Formula clarified by Antti Karttunen, Jul 10 2017
For n > 0, a(n) = A124765(n) - 1. - Gus Wiseman, Apr 08 2020

A232600 a(n) = Sum_{k=0..n} k^p*q^k, where p=1, q=-2.

Original entry on oeis.org

0, -2, 6, -18, 46, -114, 270, -626, 1422, -3186, 7054, -15474, 33678, -72818, 156558, -334962, 713614, -1514610, 3203982, -6757490, 14214030, -29826162, 62448526, -130489458, 272163726, -566697074, 1178133390, -2445745266, 5070447502, -10498808946, 21713445774
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Examples

			a(3) = 0^1*2^0 - 1^1*2^1 + 2^1*2^2 - 3^1*2^3 = -18.
		

Crossrefs

Cf. A045883, A140960 (absolute values), A059841 (p=0, q=-1), A130472 (p=1 ,q=-1), A089594 (p=2, q=-1), A232599 (p=3, q=-1), A126646 (p=0, q=2), A036799 (p=1, q=2), A036800 (p=q=2), A036827 (p=3, q=2), A077925 (p=0, q=-2), A232601 (p=2, q=-2), A232602 (p=3, q=-2), A232603 (p=2, q=-1/2), A232604 (p=3, q=-1/2).
Cf. A045883.

Programs

  • Magma
    [2*((-2)^n*(3*n+1) -1)/9: n in [0..30]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232600:= n-> 2*((-2)^n*(3*n+1) -1)/9; seq(A232600(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    Table[2((3n+1)(-2)^n -1)/9, {n, 0, 30}] (* Bruno Berselli, Nov 28 2013 *)
  • PARI
    a(n)=-((3*n+1)*(-2)^(n+1)+2)/9;
    
  • Sage
    [2*((-2)^n*(3*n+1) -1)/9 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = 2*( (3*n+1)*(-2)^n - 1 )/9.
abs(a(n)) = 2*A045883(n) = A140960(n).
From Bruno Berselli, Nov 28 2013: (Start)
G.f.: -2*x / ((1 - x)*(1 + 2*x)^2). [corrected by Georg Fischer, May 11 2019]
a(n) = -3*a(n-1) +4*a(n-3). (End)
From G. C. Greubel, Mar 31 2021: (Start)
E.g.f.: (2/9)*(-exp(x) + (1-6*x)*exp(-2*x)).
a(n) = 2*(-1)^n*A045883(n). (End)

A124761 Number of falls for compositions in standard order.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. a(n) is one fewer than the number of maximal weakly increasing runs in this composition. Alternatively, a(n) is the number of strict descents in the same composition. For example, the weakly increasing of runs of the 1234567th composition are ((3),(2),(1,2,2),(1,2,5),(1,1,1)), so a(1234567) = 5 - 1 = 4. The 4 strict descents together with the weak ascents are: 3 > 2 > 1 <= 2 <= 2 > 1 <= 2 <= 5 > 1 <= 1 <= 1. - Gus Wiseman, Apr 08 2020

Examples

			Composition number 11 is 2,1,1; 2>1<=1, so a(11) = 1.
The table starts:
  0
  0
  0 0
  0 1 0 0
  0 1 0 1 0 1 0 0
  0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0
  0 1 1 1 0 2 1 1 0 1 0 1 1 2 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0
		

Crossrefs

Cf. A066099, A124760, A124763, A124764, A011782 (row lengths), A045883 (row sums), A333213, A333220, A333379.
Positions of zeros are A225620.
Compositions of n with k strict descents are A238343.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Weakly decreasing compositions are A114994.
- Adjacent equal pairs are counted by A124762.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Weakly increasing compositions are A225620.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Initial intervals are A246534.
- Constant compositions are A272919.
- Normal compositions are A333217.
- Permutations are A333218.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Runs-resistance is A333628.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Select[Partition[stc[n],2,1],Greater@@#&]],{n,0,100}] (* Gus Wiseman, Apr 08 2020 *)

Formula

For a composition b(1),...,b(k), a(n) = Sum_{1<=i=1b(i+1)} 1.
For n > 0, a(n) = A124766(n) - 1. - Gus Wiseman, Apr 08 2020

A124764 Number of non-falls (levels or rises) for compositions in standard order.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 1, 1, 1, 2, 3, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 3, 4, 0, 0, 0, 1, 1, 0, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 4, 5, 0, 0, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 2, 2, 2, 2, 3, 4, 1, 1, 1, 2, 2, 1, 2, 3, 2
Offset: 0

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. a(n) is one fewer than the number of maximal strictly decreasing runs in this composition. Alternatively, a(n) is the number of weak ascents in the same composition. For example, the strictly decreasing runs of the 1234567th composition are ((3,2,1),(2),(2,1),(2),(5,1),(1),(1)), so a(1234567) = 7 - 1 = 6. The 6 weak ascents together with the strict descents are: 3 > 2 > 1 <= 2 <= 2 > 1 <= 2 <= 5 > 1 <= 1 <= 1. - Gus Wiseman, Apr 08 2020

Examples

			Composition number 11 is 2,1,1; 2>1<=1, so a(11) = 1.
The table starts:
  0
  0
  0 1
  0 0 1 2
  0 0 1 1 1 1 2 3
  0 0 0 1 1 1 1 2 1 1 2 2 2 2 3 4
  0 0 0 1 1 0 1 2 1 1 2 2 1 1 2 3 1 1 1 2 2 2 2 3 2 2 3 3 3 3 4 5
		

Crossrefs

Cf. A066099, A124760, A124761, A124762, A124763, A011782 (row lengths), A045883 (row sums), A233249, A238343.
Compositions of n with k weak ascents are A333213.
Positions of zeros are A333256.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Partial sums from the right are A048793 (triangle).
- Sum is A070939.
- Weakly decreasing compositions are A114994.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Reversed initial intervals A164894.
- Weakly increasing compositions are A225620.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Constant compositions are A272919.
- Normal compositions are A333217.
- Permutations are A333218.
- Heinz number is A333219.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Anti-runs are A333489.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Select[Partition[stc[n],2,1],LessEqual@@#&]],{n,0,100}] (* Gus Wiseman, Apr 08 2020 *)

Formula

a(n) = A124760(n) + A124762(n)
For a composition b(1),...,b(k), a(n) = Sum_{1<=i=1=b(i+1)} 1.
For n > 0, a(n) = A124769(n) - 1. - Gus Wiseman, Apr 08 2020
Showing 1-10 of 28 results. Next