Two positive integers m and n are given, with 5≤m≤100 and 2≤n≤100. For each exponent j, define the set of triples
Tm,j={(x,y,z)∈N3∣x≤y≤z≤m, xj+yj=zj},j=2,3,…,n
where N is the set of nonnegative integers, that is N={0,1,2,…}.
Compute the sum Sm,n:
Sm,n=∑j=2ncard(Tm,j)
Here card(Tm,j) is the number of elements of the set Tm,j.
The first line contains m. The second line contains n.
Print the value of Sm,n.