A025048 Number of up/down (initially ascending) compositions of n.
1, 1, 1, 2, 3, 4, 7, 11, 16, 26, 41, 64, 100, 158, 247, 389, 612, 960, 1509, 2372, 3727, 5858, 9207, 14468, 22738, 35737, 56164, 88268, 138726, 218024, 342652, 538524, 846358, 1330160, 2090522, 3285526, 5163632, 8115323, 12754288, 20045027, 31503382
Offset: 0
Keywords
Examples
From _Gus Wiseman_, Jan 15 2022: (Start) The a(1) = 1 through a(7) = 11 up/down compositions: (1) (2) (3) (4) (5) (6) (7) (1,2) (1,3) (1,4) (1,5) (1,6) (1,2,1) (2,3) (2,4) (2,5) (1,3,1) (1,3,2) (3,4) (1,4,1) (1,4,2) (2,3,1) (1,5,1) (1,2,1,2) (2,3,2) (2,4,1) (1,2,1,3) (1,3,1,2) (1,2,1,2,1) (End)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Wikipedia, Alternating permutation
Crossrefs
Programs
-
Mathematica
updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]
Gus Wiseman, Jan 15 2022 *)
Formula
a(n) ~ c * d^n, where d = 1.571630806607064114100138865739690782401305155950789062725011227781640624..., c = 0.4408955566119650057730070154620695491718230084159159991449729825619... . - Vaclav Kotesovec, Sep 12 2014
Extensions
Name and offset changed by Gus Wiseman, Jan 15 2022
Comments