Take the sum of the previous two terms, subtract n if this sum is greater than n.

A066949

Take the sum of the previous two terms, subtract n if this sum is greater than n.

Terms

    a(0) =0a(1) =1a(2) =1a(3) =2a(4) =3a(5) =5a(6) =2a(7) =7a(8) =1a(9) =8a(10) =9a(11) =6a(12) =3a(13) =9a(14) =12a(15) =6a(16) =2a(17) =8a(18) =10a(19) =18a(20) =8a(21) =5a(22) =13a(23) =18a(24) =7a(25) =25a(26) =6a(27) =4a(28) =10a(29) =14

External references