This question doesn't support checking answers.
277. A Modified Collatz sequence
A modified Collatz sequence of integers is obtained from a starting value in the following way:
if is divisible by . We shall denote this as a large downward step, "D".
if divided by gives a remainder of . We shall denote this as an upward step, "U".
if divided by gives a remainder of . We shall denote this as a small downward step, "d".
The sequence terminates when some .
Given any integer, we can list out the sequence of steps.
For instance if , then the sequence corresponds to the steps "DdDddUUdDD".
Of course, there are other sequences that begin with that same sequence "DdDddUUdDD....".
For instance, if , then the sequence is DdDddUUdDDDdUDUUUdDdUUDDDUdDD.
In fact, is the smallest possible that begins with the sequence DdDddUUdDD.
What is the smallest that begins with the sequence "UDDDUdddDDUDDddDdDddDDUDDdUUDd"?