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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289692 The number of partitions of [n] with exactly 2 blocks without peaks. 4

%I #51 Jul 18 2023 10:37:39

%S 0,1,2,4,8,15,27,48,85,150,264,464,815,1431,2512,4409,7738,13580,

%T 23832,41823,73395,128800,226029,396654,696080,1221536,2143647,

%U 3761839,6601568,11584945

%N The number of partitions of [n] with exactly 2 blocks without peaks.

%H Muniru A Asiru, <a href="/A289692/b289692.txt">Table of n, a(n) for n = 1..300</a>

%H T. Mansour and M. Shattuck, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Shattuck/shattuck3.html">Counting Peaks and Valleys in a Partition of a Set</a>, J. Int. Seq. 13 (2010), 10.6.8, Table 1.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,2,-1).

%F From _Colin Barker_, Nov 07 2017: (Start)

%F G.f.: x^2*(1 - x + x^2) / ((1 - x)*(1 - 2*x + x^2 - x^3)).

%F a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - a(n-4) for n>4. (End)

%F a(n) = A077855(n-2) - A005314(n-2) for n>1. - _John Molokach_, Jan 23 2018

%F a(n) - a(n-1) = A005251(n). - _R. J. Mathar_, Mar 11 2021

%p 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:

%p seq(a(n), n = 0..100); # _Muniru A Asiru_, Jan 25 2018

%t LinearRecurrence[{3, -3, 2, -1}, {0, 1, 2, 4}, 40] (* _Vincenzo Librandi_, Jan 26 2018 *)

%o (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

%o (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

%Y Cf. A005251 (first differences), A289693 (3 blocks), A289694 (4 blocks).

%K nonn,easy

%O 1,3

%A _R. J. Mathar_, Jul 09 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:10 EDT 2024. Contains 371781 sequences. (Running on oeis4.)