すべてグラフ作成ソフトGRAPESのスクリプトによって解いた.

問題1・2
 0≦n≦10で,
  x+y≦n,x,yは非負整数
を満たす(x,y)の個数f(n)を求める.
 さらに,
  A(0,f(0)),B(1,f(1)),C(2,f(2)),D(3,f(3)),E(4,f(4)),F(5,f(5)),G(6,f(6)),H(7,f(7)),I(8,f(8)),J(9,f(9))
とし,これらの点を表示し,結んでできる曲線をpath関数を使って表示する(path(x,A,B,C,D,E,F,G,H,I,J)).
 その曲線上に点K(10,f(10))があることを確認する.
 cof関数を使って,その曲線の関数の各項の係数を求め,答とする(cof(4,f(x))〜cof(0,f(x))).
 このスクリプトにより,答は,
  f(n)=n/2+3n/2+1=(n+1)(n+2)/2
となる.
 またf(3)=10となる.
 具体的なスクリプトは以下の通り.
# for n:=0 to 10
# m:=0
# for a:=0 to n
# for b:=0 to n-a
# m:=m+1
# next b
# next a
# if n=0 then
# A.x:=0
# A.y:=m
# draw
# else
# if n=1 then
# B.x:=1
# B.y:=m
# draw
# else
# if n=2 then
# C.x:=2
# C.y:=m
# draw
# else
# if n=3 then
# D.x:=3
# D.y:=m
# draw
# else
# if n=4 then
# E.x:=4
# E.y:=m
# draw
# else
# if n=5 then
# F.x:=5
# F.y:=m
# draw
# else
# if n=6 then
# G.x:=6
# G.y:=m
# draw
# else
# if n=7 then
# H.x:=7
# H.y:=m
# draw
# else
# if n=8 then
# I.x:=8
# I.y:=m
# draw
# else
# if n=9 then
# J.x:=9
# J.y:=m
# draw
# else
# K.x:=10
# K.y:=m
# draw
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# next n


問題3
 0≦n≦10で,
  x+y+z≦n,x,y,zは非負整数
を満たす(x,y,z)の個数f(n)を求める.
 方法は問題1・2と同様であり,スクリプトを以下のように変えるだけである.
# for a:=0 to n
# for b:=0 to n-a
# for c:=0 to n-a-b
# m:=m+1
# next c
# next b
# next a
 このスクリプトにより,答は,
  f(n)=n/6+n+11n/6+1=(n+1)(n+2)(n+3)/6
となる.


問題4
 0≦n≦10で,
  x/3+y≦n,x,yは非負整数
を満たす(x,y)の個数f(n)を求める.
 方法は問題1・2・3と同様であり,スクリプトを以下のように変えるだけである.
# for n:=0 to 10
# m:=0
# for a:=0 to 3n
# for b:=0 to n-a/3
# m:=m+1
# next b
# next a
 このスクリプトにより,答は,
  f(n)=3n/2+5n/2+1=(n+1)(3n+2)/2
となる.


おまけ
 問題1・2・3を一般化する.
 0≦n≦10で,
  x+y+z+t≦n,x,y,z,tは非負整数
を満たす(x,y,z,t)の個数f(n)を求める.
 方法は問題1・2・3と同様であり,スクリプトを以下のように変えるだけである.
# for a:=0 to n
# for b:=0 to n-a
# for c:=0 to n-a-b
# for d:=0 to n-a-b-c
# m:=m+1
# next d
# next c
# next b
# next a
 このスクリプトにより,
  f(n)=n/24+5n/12+35n/24+25n/12+1=(n+1)(n+2)(n+3)(n+4)/24
となる.


 さらに,0≦n≦10で,
  x+y+z+t+u≦n,x,y,z,t,uは非負整数
を満たす(x,y,z,t,u)の個数f(n)を求める.
 方法は,スクリプトを以下のように変えるだけである.
# for a:=0 to n
# for b:=0 to n-a
# for c:=0 to n-a-b
# for d:=0 to n-a-b-c
# for k:=0 to n-a-b-c-d
# m:=m+1
# next k
# next d
# next c
# next b
# next a
 このスクリプトにより,
  f(n)=n/120+n/8+17n/24+15n/8+137n/60+1=(n+1)(n+2)(n+3)(n+4)(n+5)/120
となる.


 一般化すると,
  x+x+x+………+x≦n,xは非負整数(i=1,2,3,………,m)
を満たす(x,x,x,………,x)の個数f(n)は,
  f(n)=(n+1)(n+2)(n+3)………(n+m)/m!
である.


おまけ2
 問題4を一般化する.
 0≦n≦10で,
  x/m+y≦n,x,yは非負整数,1≦m≦8
を満たす(x,y)の個数f(n)を求め,f(n)の係数を求める.
 結果は,
 m=1のとき,
  f(n)=n/2+3n/2+1=(n+3n+2)/2=(n+1)(n+2)/2
 m=2のとき,
  f(n)=n+2n+1=(2n+4n+2)/2=(n+1)
 m=3のとき,
  f(n)=3n/2+5n/2+1=(3n+5n+2)/2=(n+1)(3n+2)/2
 m=4のとき,
  f(n)=2n+3n+1=(4n+6n+2)/2=(n+1)(2n+1)
 m=5のとき,
  f(n)=5n/2+7n/2+1=(5n+7n+2)/2=(n+1)(5n+2)/2
 m=6のとき,
  f(n)=3n+4n+1=(6n+8n+2)/2=(n+1)(3n+1)
 m=7のとき,
  f(n)=7n/2+9n/2+1=(7n+9n+2)/2=(n+1)(7n+2)/2
 m=8のとき,
  f(n)=4n/2+5n+1=(8n+10n+2)/2=(n+1)(4n+1)
 故に
  f(n)={mn+(m+2)n+2}/2=(n+1)(mn+2)/2
となる.
 スクリプトは以下の通り.
# for k:=1 to 8
# for n:=0 to 10
# m:=0
# for a:=0 to k*n
# for b:=0 to n-a/k
# m:=m+1
# next b
# next a
# if n=0 then
# A.x:=0
# A.y:=m
# draw
# else
# if n=1 then
# B.x:=1
# B.y:=m
# draw
# else
# if n=2 then
# C.x:=2
# C.y:=m
# draw
# else
# if n=3 then
# D.x:=3
# D.y:=m
# draw
# else
# if n=4 then
# E.x:=4
# E.y:=m
# draw
# else
# if n=5 then
# F.x:=5
# F.y:=m
# draw
# else
# if n=6 then
# G.x:=6
# G.y:=m
# draw
# else
# if n=7 then
# H.x:=7
# H.y:=m
# draw
# else
# if n=8 then
# I.x:=8
# I.y:=m
# draw
# else
# if n=9 then
# J.x:=9
# J.y:=m
# draw
# else
# K.x:=10
# K.y:=m
# draw
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# next n
# if k=1 then
# P.x:=cof(2,f(x))
# P.y:=cof(1,f(x))
# P.r:=cof(0,f(x))
# draw
# else
# if k=2 then
# Q.x:=cof(2,f(x))
# Q.y:=cof(1,f(x))
# Q.r:=cof(0,f(x))
# draw
# else
# if k=3 then
# R.x:=cof(2,f(x))
# R.y:=cof(1,f(x))
# R.r:=cof(0,f(x))
# draw
# else
# if k=4 then
# S.x:=cof(2,f(x))
# S.y:=cof(1,f(x))
# S.r:=cof(0,f(x))
# draw
# else
# if k=5 then
# T.x:=cof(2,f(x))
# T.y:=cof(1,f(x))
# T.r:=cof(0,f(x))
# draw
# else
# if k=6 then
# L.x:=cof(2,f(x))
# L.y:=cof(1,f(x))
# L.r:=cof(0,f(x))
# draw
# else
# if k=7 then
# M.x:=cof(2,f(x))
# M.y:=cof(1,f(x))
# M.r:=cof(0,f(x))
# draw
# else
# N.x:=cof(2,f(x))
# N.y:=cof(1,f(x))
# N.r:=cof(0,f(x))
# draw
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# next k
# ---