%I #9 Mar 30 2017 21:48:54
%S 2,1,5,7,4,10,11,13,8,17,14,16,15,19,22,28,27,30,34,35,36,38,39,42,43,
%T 44,46,47,48,50,51,56,57,59,64,66,67,69,70,72,75,77,79,82,84,88,89,91,
%U 92,94,96,98,103,104,107,110,112,113,119,121,126,129,132
%N a(n) + f(a(n)) is always odd, where f is the sequence obtained by replacing each term with the corresponding row of A027746 (list of its prime factors). Lexicographic first such sequence without duplicates.
%e The reasoning below leads to the following list of indices n, prime factors f(n) and terms a(n):
%e n = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,...
%e F = 2, 1, 5, 7, 2, 2, 2, 5,11, 13, 2, 2, 2,17, 2, 7,...
%e a = 2, 1, 5, 7, 4,10,11,13, 8, 17,14,...
%e a(1)=1=f(1) is not possible because 1+1 is not odd, but a(1)=2=f(1) does not lead to a contradiction.
%e Then, a(2)=1=f(2) is also possible, because a(2)+f(a(2)) = 1+2 is odd.
%e a(3)=3=f(3) not possible because 3+3 is even. a(3)=4=f(3) is not possible because this leads to f(4)=2. But a(3)=5=f(3) is possible, leading to the constraint f(5) = 2, the only possible even prime factor.
%e We note that 3 can never occur because 3+f(3) = 3+3 is not odd.
%e a(4)=4 => f(4)=2 is not possible because 4+2 is not odd. a(4)=6 => f(5)=3 is not possible. a(4)=7=f(4) is possible, but requires that f(7) = 2.
%e a(5)=2q because f(5)=2, a(5)=4, i.e., q=2=f(6) is ok since f(4)=7 is odd.
%e We note that 6 can never occur because 6+f(6) = 6+2 is not odd.
%e a(6)=2q because f(7)=2. The number 6 is excluded. a(6)=8 is not possible because then f(8)=2 is not odd. a(6)=10, f(8)=5 is possible, and must have f(10)=odd.
%e a(7)=8 => f(9,10,11)=2 is not possible because f(10)=odd. a(7)=9 => f(9,10)=3 is not possible (9+3 is even). a(7)=11= f(9) is possible, we must have f(11)=2.
%e Now f(10) must be odd and f(11)=2 so a(8) must be an odd prime, a(8)=13=f(10) is the smallest available. Thus f(13)=2.
%e a(9)=2x because f(11)=2 and we can use a(9)=8, f(11,12,13)=2, which is possible because 8+f(8)=13. And so on...
%o (PARI) {list(n,s=[],check=(s,f=concat(apply(A027746_row,s)))->!for(i=1,#s,s[i]<=#f&&(bittest(s[i]+f[s[i]],0)||return)))=for(n=2,n,S=Set(s);s=concat(s,1);for(k=1,S[#S]+99,!setsearch(S,k)&&(s[n]=k)&&check(s)&&break));s}
%K nonn
%O 1,1
%A _M. F. Hasler_, Feb 06 2016