login
a(2n+1) = 2a(2n)-n for the odd indices. Smallest strictly positive integer not yet in the list for the even indices, a(2n).
1

%I #12 Sep 05 2017 03:42:31

%S 1,2,3,5,4,6,7,11,8,12,9,13,10,14,15,23,16,24,17,25,18,26,19,27,20,28,

%T 21,29,22,30,31,47,32,48,33,49,34,50,35,51,36,52,37,53,38,54,39,55,40,

%U 56,41,57,42,58,43,59,44,60,45,61,46,62,63,95,64,96,65,97,66,98,67,99

%N a(2n+1) = 2a(2n)-n for the odd indices. Smallest strictly positive integer not yet in the list for the even indices, a(2n).

%H Ivan Neretin, <a href="/A132196/b132196.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = m + (n-1)/2 for odd n and a(n) = (m + n)/2 for even n, where m is the greatest power of 2 not exceeding n+2. - _Ivan Neretin_, Sep 05 2017

%t Fold[Append[#1, If[OddQ[#2], 2 #1[[-1]] - (#2 - 1)/2, Min@Complement[Range[Max[#1] + 1], #1]]] &, {1}, Range[71]] (* _Ivan Neretin_, Sep 04 2017 *)

%K nonn

%O 0,2

%A _Paul Curtz_, Nov 05 2007

%E Edited by _R. J. Mathar_, Nov 16 2007