Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A245332 Number of compositions of n into parts 2 and 3 with at least one 2 and one 3. 5
0, 0, 0, 0, 0, 2, 0, 3, 3, 4, 6, 9, 10, 16, 20, 27, 36, 49, 63, 86, 113, 150, 199, 265, 349, 465, 615, 815, 1080, 1432, 1895, 2513, 3328, 4409, 5841, 7739, 10250, 13581, 17990, 23832, 31571, 41824, 55403, 73396, 97228, 128800, 170624, 226030, 299424, 396655 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
The g.f. for compositions of n into parts r, s with both parts present is 1 + 1/(1-x^r-x^s) - 1/(1-x^r) - 1/(1-x^s). - Joerg Arndt, Jul 24 2014
LINKS
FORMULA
a(n) = a(n-2)+a(n-3)+b(n) with initial terms a(5)=2,a(6)=0,a(7)=3 and b(8)=1,b(9)=1,b(10)=0,b(11)=2,b(12)=0,b(13)=1 and b(n)=b(n-6).
G.f.: x^5*(x^2+2*x+2) / ((x-1)*(x+1)*(x^2+x+1)*(x^3+x^2-1)). - Colin Barker, Jul 18 2014
EXAMPLE
a(12) = number of rearrangements of 33222 = 5!/(3!*2!) = 10.
MATHEMATICA
CoefficientList[Series[x^5 (x^2 + 2 x + 2)/((x - 1) (x + 1) (x^2 + x + 1) (x^3 + x^2 - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 25 2014 *)
PROG
(PARI) a=vector(100); a[5]=2; a[7]=3; b=[1, 1, 0, 2, 0, 1]; k=1; for(n=8, #a, a[n]=a[n-2]+a[n-3]+b[k]; if(k==6, k=1, k++)); a \\ Colin Barker, Jul 18 2014
(PARI)
x='x+O('x^66);
r=2; s=3;
gf = 1 + 1/(1-x^r-x^s) - 1/(1-x^r) - 1/(1-x^s);
Vec(gf)
\\ Joerg Arndt, Jul 24 2014
CROSSREFS
Sequence in context: A180772 A370594 A291304 * A202035 A369494 A343762
KEYWORD
nonn,easy
AUTHOR
David Neil McGrath, Jul 18 2014
EXTENSIONS
More terms from Colin Barker, Jul 18 2014
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 19:26 EDT 2024. Contains 375273 sequences. (Running on oeis4.)