a(0)=0; thereafter a(n) = the smallest nonnegative integer not already in the sequence such that a(n-1) is congruent to a(n) (mod n).

A125717

a(0)=0; thereafter a(n) = the smallest nonnegative integer not already in the sequence such that a(n-1) is congruent to a(n) (mod n).

Terms

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

External references