Coprime triplets: Difference between revisions

m
no edit summary
mNo edit summary
Line 2:
 
;Task:
FindStarting from the sequence a(1)=1 and showa(2)=2 find the next smallest number which is coprime to the last two predecessors and has not yet appeared; a(1)=1,yet a(2)=2in the sequence.
<br>p and q are coprimes if they have no common factors other than 1.
<br> Let '''p, q < 50'''
1,111

edits