求不定方程x+2y+3z=18的正整数解的个数
x=1, y=1 =>z=5 ; (x,y,z) = (1,1,5)
x=1, y=2 =>z=13/3 ( 舍去)
x=1, y=3 =>z=11/3 ( 舍去)
x=1, y=4 =>z=3 ; (x,y,z) = (1,4,3)
x=1, y=5 =>z=7/3 ( 舍去)
x=1, y=6 =>z=5/3 ( 舍去)
x=1, y=7 =>z=1 ; (x,y,z) = (1,7,1)
x=2, y=1 =>z=14/3 ( 舍去)
x=2, y=2 =>z=4 ; (x,y,z) = (2,2,4)
x=2, y=3 =>z=10/3 ( 舍去)
x=2, y=4 =>z=8/3 ( 舍去)
x=2, y=5 =>z=2 ; (x,y,z) = (2,5,2)
x=2, y=6 =>z=4/3 ( 舍去)
x=2, y=7 =>z=2/3 ( 舍去)
x=3, y=1 =>z=13/3 ( 舍去)
x=3, y=2 =>z=11/3 ( 舍去)
x=3, y=3 =>z=3 ; (x,y,z) = (3,3,3)
x=3, y=4 =>z=7/3 ( 舍去)
x=3, y=5 =>z=5/3 ( 舍去)
x=3, y=6 =>z=1 ; (x,y,z) = (3,6,1)
x=4, y=1 =>z=4 ; (x,y,z) = (4,1,4)
x=4, y=2 =>z=10/3 ( 舍去)
x=4, y=3 =>z=8/3 ( 舍去)
x=4, y=4 =>z=2 ; (x,y,z) = (4,4,2)
x=4, y=5 =>z=4/3 ( 舍去)
x=4, y=6 =>z=2/3 ( 舍去)
x=5, y=1 =>z=11/3 ( 舍去)
x=5, y=2 =>z=3 ; (x,y,z) = (5,2,3)
x=5, y=3 =>z=7/3 ( 舍去)
x=5, y=4 =>z=5/3 ( 舍去)
x=5, y=5 =>z=1 ; (x,y,z) = (5,5,1)
x=6, y=1 =>z=10/3 ( 舍去)
x=6, y=2 =>z=8/3 ( 舍去)
x=6, y=3 =>z=2 ; (x,y,z) = (6,3,1)
x=6, y=4 =>z=4/3 ( 舍去)
x=6, y=5 =>z=2/3 ( 舍去)
x=7, y=1 =>z=3 ; (x,y,z) = (7,1,3)
x=7, y=2 =>z=7/3 ( 舍去)
x=7, y=3 =>z=5/3 ( 舍去)
x=7, y=4 =>z=1 ; (x,y,z) = (7,4,1)
x=8, y=1 =>z=8/3 ( 舍去)
x=8, y=2 =>z=2 ; (x,y,z) = (8,2,2)
x=8, y=3 =>z=4/3 ( 舍去)
x=8, y=4 =>z=2/3 ( 舍去)
x=9, y=1 =>z=7/3 ( 舍去)
x=9, y=2 =>z=5/3 ( 舍去)
x=9, y=3 =>z=1 ; (x,y,z) = (9,3,1)
x=10, y=1 =>z=2 ; (x,y,z) = (10,1,2)
x=10, y=2 =>z=4/3 ( 舍去)
x=10, y=3 =>z=2/3 ( 舍去)
x=11, y=1 =>z=5/3 ( 舍去)
x=11, y=2 =>z=1 ; (x,y,z) = (11,2,1)
x=12, y=1 =>z=4/3 ( 舍去)
x=12, y=2 =>z=2/3 ( 舍去)
x=13, y=1 =>z=1 ; (x,y,z) = (13,1,1)
所以:z<6
当z=5, 则:x+2y=3,则:x=1,y=1,此为1组正整数解
当z=4,则:x+2y=6,则:x=2(3-y),y可以取1,2,所以有2组正整数解
当z=3,则:x+2y=9,则:x-1=2(4-y),y可以取1,2,3和4,所以有4组正整数解
当z=2,则:x+2y=12,则:x=2(6-y),y可以取1,2,3,4和5,所以有5组正整数解
当z=1,则:x+2y=15,则:x-1=2(7-y),y可以取1,2,3,4,5,6和7,所以有7组正整数解
综合以上,
总共有正整数解的个数为:1+2+4+5+7=19组
所以:z<6
当z=5,
则:x+2y=3,则:x=1,y=1,此为1组正整数解
当z=4,则:x+2y=6,则:x=2(3-y),y可以取1,2,所以有2组正整数解
当z=3,则:x+2y=9,则:x-1=2(4-y),y可以取1,2,3和4,所以有4组正整数解
当z=2,则:x+2y=12,则:x=2(6-y),y可以取1,2,3,4和5,所以有5组正整数解
当z=1,则:x+2y=15,则:x-1=2(7-y),y可以取1,2,3,4,5,6和7,所以有7组正整数解
综合以上,
总共有正整数解的个数为:1+2+4+5+7=19组
x=1,y=4,z=3
x=1,y=7,z=1
x=2,y=2,z=4
x=2,y=5,z=2
x=3,y=3,2=3
x=3,y=6,z=1
x=4,y=1,z=4
x=4,y=4,z=2
x=5,y=2,Z=3
x=5,y=5,Z=1
x=6,y=3,z=2
x=7,y=1,Z=3
x=7,y=4,Z=1
x=8,y=2,z=2
x=9,y=3,z=1
x=10,y=1,z=2
x=11,y=2,Z=1
x=13,y=1,Z=1