ok this program is based on the number theory... it is know as the necklace program... i have tried every single way i can think of and am seeking some help

this is how it works

enter first number: 1

enter second number: 8

then we add 1+8= 9 then we add 8+9=17 and then removing the 1 resulting in the number 7 the next step is then to do 9+7=16 wich becomes 6 and so on until the necklace closes by repeating the beginning 1,8

1,8,9,7,6,3,9,2,1,3,4,7,1,8

plz help me! i repeat im not asking for freebies... i have worked on this a long time and am getting no-where