login
A362962
Lexicographically earliest sequence of distinct positive terms such that if a(n) jumps over a(n) positions towards the right (landing on the integer k), the sum a(n) + k is always prime.
0
1, 2, 4, 5, 3, 6, 7, 9, 10, 8, 11, 12, 13, 14, 16, 17, 15, 20, 21, 19, 22, 23, 18, 24, 25, 26, 28, 29, 27, 30, 31, 37, 32, 36, 33, 34, 35, 38, 39, 40, 46, 41, 42, 45, 43, 44, 47, 48, 49, 50, 54, 51, 53, 55, 52, 61, 56, 60, 57, 58, 59, 62, 66, 63, 64, 65, 67, 68
OFFSET
1,2
COMMENTS
a(n) - a(n+k) = k with k odd is forbidden as this would lead to a contradiction. This is why a(4) = 5 here and not a(4) = 3.
The sequence is a permutation of the natural numbers.
EXAMPLE
S = 1, 2, 4, 5, 3, 6, 7, 9, 10, 8, 11, 12, 13, ...
sum = 5 5 13 13 13 19
a(1) = 1 and 1 + 4 = 5 (prime)
a(2) = 2 and 2 + 3 = 5 (prime)
a(3) = 4 and 4 + 9 = 13 (prime)
a(4) = 5 and 5 + 8 = 13 (prime)
a(5) = 3 and 3 + 10 = 13 (prime)
a(6) = 6 and 6 + 13 = 19 (prime), etc.
CROSSREFS
Sequence in context: A332017 A276127 A182115 * A065182 A060120 A065183
KEYWORD
nonn
AUTHOR
Eric Angelini, May 10 2023
EXTENSIONS
a(22) and beyond from Michael S. Branicky, May 10 2023
STATUS
approved