A367288 Lexicographically earliest sequence of distinct nonnegative integers such that for any n > 0, a(n-1) and a(n) are congruent modulo n, and the least value not yet in the sequence appears as soon as possible.
0, 1, 5, 2, 18, 3, 39, 4, 60, 6, 106, 7, 151, 8, 204, 9, 265, 10, 334, 11, 411, 12, 496, 13, 589, 14, 690, 15, 799, 16, 916, 17, 1009, 19, 1175, 20, 1316, 21, 1465, 22, 1622, 23, 1787, 24, 1960, 25, 2141, 26, 2330, 27, 2527, 28, 2732, 29, 2945, 30, 3166, 31
Offset: 0
Keywords
Examples
The first terms are: n a(n) a(n-1) mod n a(n) mod n -- ---- ------------ ---------- 0 0 N/A N/A 1 1 0 0 2 5 1 1 3 2 2 2 4 18 2 2 5 3 3 3 6 39 3 3 7 4 4 4 8 60 4 4 9 6 6 6 10 106 6 6 11 7 7 7 12 151 7 7 13 8 8 8
Links
Programs
-
PARI
See Links section.
Comments