login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113979 Number of compositions of n with an even number of 1's. 1
0, 2, 1, 6, 6, 20, 28, 72, 120, 272, 496, 1056, 2016, 4160, 8128, 16512, 32640, 65792, 130816, 262656, 523776, 1049600, 2096128, 4196352, 8386560, 16781312, 33550336, 67117056, 134209536, 268451840, 536854528, 1073774592, 2147450880 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

More generally, g.f. for number of compositions such that part m occurs with even multiplicity is (1-x)/(1-2*x)*(1-2*x+x^m-x^(m+1))/(1-2*x+2*x^m-2*x^(m+1)). - Vladeta Jovovic (vladeta(AT)eunet.rs), Sep 01 2007

FORMULA

2^(n-2)+2^((n-2)/2) if n is even, else 2^(n-2)-2^((n-3)/2).

G.f.=z(2-3z)/[(1-2z)(1-2z^2)]. - Emeric Deutsch (deutsch(AT)duke.poly.edu), Feb 03 2006

E.g.f.: (exp(2x)+sqrt(2)*sinh(x*sqrt(2))-cosh(x*sqrt(2)))/2. - Sergei N. Gladkovskii, Nov 18 2011

a(k) = 1/2*2^k+1/4*(sqrt(2)-1)*(sqrt(2))^k-1/4*(sqrt(2)+1)*(-sqrt(2))^k). - Sergei N. Gladkovskii, Nov 18 2011

EXAMPLE

a(4)=6 because the compositions of 4 having an even number of 1's are 4,22,211,121,112 and 1111 (the other compositions of 4 are 31 and 13).

MAPLE

a:=proc(n) if n mod 2 = 0 then 2^(n-2)+2^((n-2)/2) else 2^(n-2)-2^((n-3)/2) fi end: seq(a(n), n=1..38); (Deutsch)

MATHEMATICA

f[n_] := If[ EvenQ[n], 2^(n - 2) + 2^((n - 2)/2), 2^(n - 2) - 2^((n - 3)/2)]; Array[f, 34] (* Robert G. Wilson v *)

CROSSREFS

Cf. A063376, A006516, A063083, A100818, A092295, A111752, A111753, A111723, A111724, A088336, A088506.

Cf. A105422.

Sequence in context: A145883 A062820 A113336 * A053442 A019082 A052636

Adjacent sequences:  A113976 A113977 A113978 * A113980 A113981 A113982

KEYWORD

easy,nonn

AUTHOR

Vladeta Jovovic (vladeta(AT)eunet.rs), Jan 31 2006

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(at)rgwv.com) and Emeric Deutsch (deutsch(AT)duke.poly.edu), Feb 01 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 04:47 EST 2012. Contains 205860 sequences.