The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A289692 The number of partitions of [n] with exactly 2 blocks without peaks. 4
 0, 1, 2, 4, 8, 15, 27, 48, 85, 150, 264, 464, 815, 1431, 2512, 4409, 7738, 13580, 23832, 41823, 73395, 128800, 226029, 396654, 696080, 1221536, 2143647, 3761839, 6601568, 11584945 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Muniru A Asiru, Table of n, a(n) for n = 1..300 T. Mansour and M. Shattuck, Counting Peaks and Valleys in a Partition of a Set, J. Int. Seq. 13 (2010), 10.6.8, Table 1. Index entries for linear recurrences with constant coefficients, signature (3,-3,2,-1). FORMULA From Colin Barker, Nov 07 2017: (Start) G.f.: x^2*(1 - x + x^2) / ((1 - x)*(1 - 2*x + x^2 - x^3)). a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - a(n-4) for n>4. (End) a(n) = A077855(n-2) - A005314(n-2) for n>1. - John Molokach, Jan 23 2018 a(n) - a(n-1) = A005251(n). - R. J. Mathar, Mar 11 2021 MAPLE a := proc(n) option remember: if n = 1 then 0 elif n = 2 then 1 elif n=3 then 2 elif n=4 then 4 elif n >= 5 then 3*procname(n-1) -3*procname(n-2)+2*procname(n-3)-procname(n-4) fi; end: seq(a(n), n = 0..100); # Muniru A Asiru, Jan 25 2018 MATHEMATICA LinearRecurrence[{3, -3, 2, -1}, {0, 1, 2, 4}, 40] (* Vincenzo Librandi, Jan 26 2018 *) PROG (GAP) a:=[0, 1, 2, 4]; for n in [5..10^2] do a[n]:=3*a[n-1]-3*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Jan 25 2018 (Magma) I:=[0, 1, 2, 4]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-2)+2*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jan 26 2018 CROSSREFS Cf. A005251 (first differences), A289693 (3 blocks), A289694 (4 blocks). Sequence in context: A182716 A143281 A098057 * A074029 A248729 A138653 Adjacent sequences: A289689 A289690 A289691 * A289693 A289694 A289695 KEYWORD nonn,easy AUTHOR R. J. Mathar, Jul 09 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 30 12:26 EST 2023. Contains 367461 sequences. (Running on oeis4.)