login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is even".
12

%I #20 Aug 31 2018 09:26:37

%S 0,3,5,6,7,8,10,12,14,15,16,17,18,19,20,22,24,26,28,30,32,33,34,35,36,

%T 37,38,39,40,41,42,43,44,46,48,50,52,54,56,58,60,62,64,66,68,69,70,71,

%U 72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,96

%N a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is even".

%D Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585

%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://www.cs.uwaterloo.ca/journals/JIS/index.html">Numerical analogues of Aronson's sequence</a>, J. Integer Seqs., Vol. 6 (2003), #03.2.2.

%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://arXiv.org/abs/math.NT/0305308">Numerical analogues of Aronson's sequence</a> (math.NT/0305308)

%H <a href="/index/Aa#aan">Index entries for sequences of the a(a(n)) = 2n family</a>

%F For a formula for a(n) see A079000.

%F a(a(n)) = 2n+4 for n >= 1.

%e a(1) cannot be 1 because that would imply that the first term is even; it cannot be 2 because then the first term would be even despite 1's not being in the sequence; therefore a(1)=3, which creates no contradictions and the third term is the first even term of the sequence.

%t a[0] = 0; a[n_] := With[{k = 2^Floor[Log[2, (n+4)/6]]}, (Abs[n - 9k + 4] - 3k + 3n + 6)/2 - 1];

%t Table[a[n], {n, 0, 70}] (* _Jean-François Alcover_, Aug 31 2018 *)

%Y Equals A079000 - 1.

%K nonn

%O 0,2

%A _Matthew Vandermast_ and _N. J. A. Sloane_, Feb 04 2003