Menu Close

Find-the-number-of-solutions-for-positive-integers-x-y-z-satisfying-x-2y-3z-n-




Question Number 84182 by mr W last updated on 11/Mar/20
Find the number of solutions for  positive integers (x,y,z) satisfying  x+2y+3z=n.
Findthenumberofsolutionsforpositiveintegers(x,y,z)satisfyingx+2y+3z=n.
Answered by mr W last updated on 10/Mar/20
Method 1  let′s find at first the number of  solutions for x+2y=m with m≥3.  ⇒1≤y≤⌊((m−1)/2)⌋  i.e. there are ⌊((m−1)/2)⌋ solutions for  x+2y=m.    1≤z≤⌊((n−3)/3)⌋  m=n−3z  total number of solutions:  ⇒N(n)=Σ_(z=1) ^(⌊((n−3)/3)⌋) ⌊((m−1)/2)⌋=Σ_(z=1) ^(⌊((n−3)/3)⌋) ⌊((n−3z−1)/2)⌋    examples:  n=6: N=1  n=10: N=4  n=55: N=225  n=78: N=469  n=1000: N=82834
Method1letsfindatfirstthenumberofsolutionsforx+2y=mwithm3.1ym12i.e.therearem12solutionsforx+2y=m.1zn33m=n3ztotalnumberofsolutions:N(n)=n33z=1m12=n33z=1n3z12examples:n=6:N=1n=10:N=4n=55:N=225n=78:N=469n=1000:N=82834
Answered by mr W last updated on 10/Mar/20
Method 2  generating function for x+2y+3z is  (x/(1−x))×(x^2 /(1−x^2 ))×(x^3 /(1−x^3 ))=(x^6 /((1−x)(1−x^2 )(1−x^3 )))  number of solutions of x+2y+3z=n  is the coefficient of x^n  term of the  generating function above.   the taylor series of (x^6 /((1−x)(1−x^2 )(1−x^3 ))):
Method2generatingfunctionforx+2y+3zisx1x×x21x2×x31x3=x6(1x)(1x2)(1x3)numberofsolutionsofx+2y+3z=nisthecoefficientofxntermofthegeneratingfunctionabove.thetaylorseriesofx6(1x)(1x2)(1x3):
Commented by mr W last updated on 10/Mar/20
Commented by mr W last updated on 10/Mar/20
the coefficient of x^6  term is 1, it   means x+2y+3z=6 has one solution.  the coefficient of x^(78)  term is 469, it   means x+2y+3z=78 has 469 solutions.  all results coincide with the results  from method 1.
thecoefficientofx6termis1,itmeansx+2y+3z=6hasonesolution.thecoefficientofx78termis469,itmeansx+2y+3z=78has469solutions.allresultscoincidewiththeresultsfrommethod1.

Leave a Reply

Your email address will not be published. Required fields are marked *