That seriously did not need, and should not have been in, a separate pdf file. You want to find all combinations in Z_5 of two given basis vectors. Can be done as below.
hvecs = {{1, 2, 1}, {1, 1, 1}};
mod = 5;
Tuples[Range[0, 4], {2}] . hvecs
(* Out[83]= {{0, 0, 0}, {1, 1, 1}, {2, 2, 2}, {3, 3, 3}, {4, 4, 4}, {1,
2, 1}, {2, 3, 2}, {3, 4, 3}, {4, 5, 4}, {5, 6, 5}, {2, 4, 2}, {3, 5,
3}, {4, 6, 4}, {5, 7, 5}, {6, 8, 6}, {3, 6, 3}, {4, 7, 4}, {5, 8,
5}, {6, 9, 6}, {7, 10, 7}, {4, 8, 4}, {5, 9, 5}, {6, 10, 6}, {7, 11,
7}, {8, 12, 8}} *)