This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A366170 #38 Oct 23 2023 11:16:40 %S A366170 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, %T A366170 28,32,31,29,40,42,34,36,37,44,35,27,41,50,46,39,33,56,47,52,68,49,43, %U A366170 54,53,51,60,58,57,45,66,55,61,74,64,63,84,72,67,78,65,59,70,90,73,80 %N 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. %C A366170 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. %C A366170 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. %C A366170 Can it be proved that every odd number appears? %H A366170 Neal Gersh Tolunsky, <a href="/A366170/b366170.txt">Table of n, a(n) for n = 1..10000</a> %H A366170 Neal Gersh Tolunsky, <a href="/A366170/a366170.png">Graph of the first differences for n = 1..10001</a> %e A366170 At [1,2], the terms at indices i=1 and i=2, namely 1 and 2, sum to 3, a prime. %e A366170 At [1,2,4], i=4 is not the index of a term in the sequence yet, so the sum remains the same. %e A366170 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. %Y A366170 Cf. A054408, A180405, A359535. %K A366170 nonn %O A366170 1,2 %A A366170 _Neal Gersh Tolunsky_, Oct 02 2023