A367290 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, a(n) and a(n+1) are congruent modulo the n-th prime number, and the least value not yet in the sequence appears as soon as possible.
1, 5, 2, 17, 3, 69, 4, 310, 6, 558, 7, 193, 8, 869, 9, 2077, 10, 1780, 11, 3562, 12, 961, 13, 6155, 14, 2439, 15, 8255, 16, 6120, 18, 12464, 19, 9472, 20, 11195, 21, 4260, 22, 24070, 23, 16133, 24, 18360, 25, 19528, 26, 27456, 27, 25905, 28, 46395, 29, 6054
Offset: 1
Keywords
Examples
The first terms are: n a(n) a(n) mod prime(n) a(n+1) mod prime(n) -- ----- ----------------- ------------------- 1 1 1 1 2 5 2 2 3 2 2 2 4 17 3 3 5 3 3 3 6 69 4 4 7 4 4 4 8 310 6 6 9 6 6 6 10 558 7 7 11 7 7 7 12 193 8 8 13 8 8 8
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
See Links section.
Comments