a(1)=1. a(n) is smallest positive integer not occurring earlier in the sequence where a(n) is congruent to -1 (mod a(n-1)).

A117120

a(1)=1. a(n) is smallest positive integer not occurring earlier in the sequence where a(n) is congruent to -1 (mod a(n-1)).

Terms

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

External references