recaman专题

poj 2081【Recaman's Sequence】

Description The Recaman's sequence is defined by a0 = 0 ; for m > 0, a  m = a  m−1 − m if the rsulting a  m is positive and not already in the sequence, otherwise a  m = a  m−1 + m.  The first few