A337226 Lexicographically earliest sequence of positive integers with the property that, for all k > 0, there is at most one j such that a(j) = a(j+k).
1, 1, 2, 1, 3, 4, 2, 5, 1, 6, 3, 7, 8, 9, 4, 10, 2, 11, 5, 12, 1, 13, 6, 14, 15, 3, 16, 7, 17, 18, 8, 19, 20, 21, 22, 9, 23, 4, 24, 10, 25, 2, 26, 11, 27, 5, 28, 12, 29, 1, 30, 13, 31, 6, 32, 33, 14, 34, 15, 35, 36, 3, 37, 16, 38, 39, 40, 7, 41, 42, 17, 43, 18, 44, 45, 8
Offset: 1
Examples
1 1 2 1 3 4 2 (1)1 2 1 3 4 k = 1 1(1)2 1 3 k = 2 (1)1 2 1 k = 3 1 1(2) k = 4 1 1 k = 5 1 k = 6 Coincidences are circled. There can only be one coincidence per row. a(3) cannot be 1 because that would result in two coincidences for k = 1. a(5) cannot be 1 or 2 because those values would result in two coincidences for k = 1 and k = 2, respectively. a(7) cannot be 1, 3, or 4 because those values would result in two coincidences for k = 3, k = 2, and k = 1, respectively. It can, however, be 2 because this results in no double coincidences.
Links
- Samuel B. Reid, Table of n, a(n) for n = 1..10000
- Samuel B. Reid, Python program for A337226
Programs
-
Python
# See Links section.
Comments