Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A113979
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A113979 Number of compositions of n with an even number of 1's. +0
2
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; listen)
OFFSET

1,2

COMMENT

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

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 this_sequence A053442 A019082 A052636

Adjacent sequences: A113976 A113977 A113978 this_sequence 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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 17 13:29 EST 2009. Contains 170826 sequences.


AT&T Labs Research