MathDB
HMMT Combinatorics 2019/10: I wish I could walk for 40 minutes

Source:

February 17, 2019
HMMTcombinatorics

Problem Statement

Fred the Four-Dimensional Fluffy Sheep is walking in 4-dimensional space. He starts at the origin. Each minute, he walks from his current position (a1,a2,a3,a4)(a_1, a_2, a_3, a_4) to some position (x1,x2,x3,x4)(x_1, x_2, x_3, x_4) with integer coordinates satisfying (x_1-a_1)^2 + (x_2-a_2)^2 + (x_3-a_3)^2 + (x_4-a_4)^2 = 4   \text{and}   |(x_1 + x_2 + x_3 + x_4) - (a_1 + a_2 + a_3 + a_4)| = 2. In how many ways can Fred reach (10,10,10,10)(10, 10, 10, 10) after exactly 40 minutes, if he is allowed to pass through this point during his walk?