A371220 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, a(1) + ... + a(n) is a multiple of n, and the least value not yet in the sequence appears as soon as possible.
1, 3, 2, 10, 4, 52, 5, 43, 6, 54, 7, 65, 8, 76, 9, 103, 11, 99, 12, 110, 13, 121, 14, 132, 15, 143, 16, 154, 17, 165, 18, 176, 19, 187, 20, 198, 21, 209, 22, 220, 23, 231, 24, 242, 25, 253, 26, 264, 27, 275, 28, 286, 29, 297, 30, 308, 31, 319, 32, 330, 33, 341
Offset: 1
Keywords
Examples
The first terms, alongside the average of the first terms, are: n a(n) (a(1)+...+a(n))/n -- ---- ----------------- 1 1 1 2 3 2 3 2 2 4 10 4 5 4 4 6 52 12 7 5 11 8 43 15 9 6 14 10 54 18 11 7 17 12 65 21
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