(MAGMAMagma) [((n + 1)^5 - (1 + (-1)^n)/2)/2: n in [0..50]]; // Vincenzo Librandi, Jul 04 2011
(MAGMAMagma) [((n + 1)^5 - (1 + (-1)^n)/2)/2: n in [0..50]]; // Vincenzo Librandi, Jul 04 2011
reviewed
approved
proposed
reviewed
editing
proposed
From _R. J. Mathar, _, Jun 22 2011: (Start)
Cf. A191484.
proposed
editing
editing
proposed
Number of compositions of odd natural numbers positive integers into 5 parts <= n.
a(1)=16: the 16 compositions of odd numbers into 5 parts <= 1 are
1: (0,0,0,0,1) --> 5!/(4!1!) = 5;
3: (0,0,1,1,1) --> 5!/(2!3!) = 10;
5: (1,1,1,1,1) --> 5!/(0!5!) = 1.
(MAGMA) [((n + 1)^5 - (1 + (-1)^n)/2)/2: n in [0..50]]; // _Vincenzo Librandi, _, Jul 04 2011
approved
editing
editing
approved
<a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (5,-9,5,5,-9,5,-1).
(PARI) a(n)=((n+1)^5-(1+(-1)^n)/2)/2 \\ Charles R Greathouse IV, Jul 06 2017
nonn,easy
approved
editing