Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #29 Mar 05 2019 00:14:58
%S 1,2,3,2,4,5,6,2,7,8,9,10,11,12,13,2,14,15,16,17,18,19,20,21,22,23,24,
%T 25,26,27,28,2,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
%U 47,48,49,50,51,52,53,54,55,56,57,58,59,2,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78
%N Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(n) = -1 if n = 2^k and k > 0, and f(n) = n for all other numbers.
%C In the following, A stands for this sequence, A324400, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j >= 1: S(i) = S(i) => T(i) = T(j).
%C For example, the following chains of implications hold:
%C A -> A286619 -> A005811,
%C and
%C A -> A003602 -> A286622 -> A000120,
%C -> A286378 -> A002487,
%C -> A323889,
%C -> A000593,
%C -> A001227,
%C among many others.
%H Antti Karttunen, <a href="/A324400/b324400.txt">Table of n, a(n) for n = 1..65537</a>
%F If n <= 3, a(n) = n; and for n >= 4, if A209229(n) = 1, then a(n) = 2, otherwise a(n) = 1 + n - A000523(n).
%o (PARI)
%o A000523(n) = if(n<1, 0, #binary(n)-1);
%o A324400(n) = if(n<4,n,if(!bitand(n,n-1),2,1+n-A000523(n)));
%Y Cf. A000523.
%Y Cf. A000120, A000265, A000593, A001227, A002487, A003602, A005811, A209229, A286378, A286619, A286622, A294898, A297159, A318311, A323234, A323889, A323904, A324343, A324345 (some of the matching sequences).
%Y Cf. also A103391, A295300, A305800, A305801, A324401.
%K nonn
%O 1,2
%A _Antti Karttunen_, Mar 01 2019