OFFSET
0,2
REFERENCES
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
LINKS
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence (math.NT/0305308)
FORMULA
For a formula for a(n) see A079000.
a(a(n)) = 2n+4 for n >= 1.
EXAMPLE
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.
MATHEMATICA
a[0] = 0; a[n_] := With[{k = 2^Floor[Log[2, (n+4)/6]]}, (Abs[n - 9k + 4] - 3k + 3n + 6)/2 - 1];
Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Aug 31 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Vandermast and N. J. A. Sloane, Feb 04 2003
STATUS
approved