login
A366170
Lexicographically earliest sequence of distinct positive integers such that for n>1, Sum_{i=1..n, a(i)<=n} a(a(i)) is prime.
1
1, 2, 4, 8, 6, 12, 5, 7, 10, 18, 13, 11, 14, 16, 17, 24, 20, 22, 21, 15, 19, 26, 3, 23, 9, 30, 28, 32, 31, 29, 40, 42, 34, 36, 37, 44, 35, 27, 41, 50, 46, 39, 33, 56, 47, 52, 68, 49, 43, 54, 53, 51, 60, 58, 57, 45, 66, 55, 61, 74, 64, 63, 84, 72, 67, 78, 65, 59, 70, 90, 73, 80
OFFSET
1,2
COMMENTS
At a new term k, a(n) = k adds a(k) to the current prime sum if k <= n. If n is a term in the sequence among a(1..n-1), then a(n) = k is added. If neither of these conditions is met, the current prime sum remains the same.
If k is even and a(k) odd, then k cannot appear as a(n) = k at any n >= k (otherwise, the intended prime sum will be even, and thus not prime). This means that some even numbers will miss their chance and never appear. 38 is the smallest missing number.
Can it be proved that every odd number appears?
EXAMPLE
At [1,2], the terms at indices i=1 and i=2, namely 1 and 2, sum to 3, a prime.
At [1,2,4], i=4 is not the index of a term in the sequence yet, so the sum remains the same.
At [1,2,4,8], the sum of the terms at i=1,2,4 is a(1)=1 + a(2)=2 + a(4)=8, which is 11, a prime number.
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Oct 02 2023
STATUS
approved