Fibonacci Numbers, Necklaces, Number Theory (modulo 10)

132 Views Asked by At

Given 2 numbers a and b form a "necklace" by adding them together mod 10, taking the last 2 numbers in the sequence, adding them mod 10 and so on until you get back to the start. E.g With 1 and 8: 1,8,9,7,6,3,9,2,1,3,4,7,1,8. Define P(a,b) to be the number of steps needed to get back to the original, in the above case 12.Can someone give me a formula for P(a,b) in terms of a,b? What about P(a,b,n) where n is the modulus (10 in my case)? I have already all the answers for base 10 as I made a chart but that is a dumb way to solve the problem and doesn't extend for general modulo. Thanks in advance!