**this Magic Die**? I've got another magic die, which is n-sided (with numbers 1 through n on its faces) and where n=0 mod 8.

After the first roll, if an odd number appears on the top face, all odd numbers on the die are squared. If an even number appears on the top face, all odd numbers are increased by 3 and then all numbers are halved and then squared.

If the given die changes as described and assuming a perfectly balanced die, what is the probability that the number appearing on the second roll of the die is 1 mod 8? How about 4 mod 8?