2021 AAMC 10 #19

Problem:

How many sequences of five nonzero digits are such that the product of any two consecutive digits is a perfect square?

(A) 279(B) 280(C) 281(D) 282(E) 283

Solution:

We perform casework on the first digit of the sequence.

If a is a perfect square, meaning that it is one out of 1,4,9, then the other 4 elements in the sequence must also be perfect squares. So, there are 34 possibilities for this case, but there are 3 such cases, so there are 334=35 possibilities. 

If a=2, then the other elements each must be one out of 2,8, so there are 24 possibilities. 

If a is one out of 3,5,6,7, the other elements must be a itself, so there is only 1 possibility for each of these 4 cases, giving us 4 possibilities. 

If a=8, then the other elements must be one out of 2,8, so there are 24 possibilities. 

Lastly, summing up all of these, we get that the total number of possibilities is 35+24+4+24=(A) 279

Comments