OFFSET
1,2
COMMENTS
a(a(n)) = 2n + 3 for n>1.
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
N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93-110.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000
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, arXiv:math/0305308 [math.NT], 2003.
N. J. A. Sloane, Seven Staggering Sequences.
FORMULA
a(1) = 1, a(2) = 4, then a(9*2^k-3+j) = 12*2^k-3+3*j/2+|j|/2 for k>=0, -3*2^k <= j <= 3*2^k. Also a(3n) = 3*b(n/3), a(3n+1) = 2*b(n)+b(n+1), a(3n+2) = b(n)+2*b(n+1) for n>=2, where b = A079905. - N. J. A. Sloane and Benoit Cloitre, Feb 20 2003
a(n+1) - 2*a(n) + a(n-1) = 1 for n = 9*2^k - 3, k>=0, = -1 for n = 2 and 3*2^k-3, k>=1 and = 0 otherwise.
EXAMPLE
a(2) cannot be 2 because 2 is even; it cannot be 3 because that would require 2 to be a member of the sequence. Hence a(2)=4 and the next odd member of the sequence is the fourth member.
MAPLE
Digits := 50; A079000 := proc(n) local k, j; if n<=2 then n^2; else k := floor(evalf(log( (n+3)/6 )/log(2)) ); j := n-(9*2^k-3); 12*2^k-3+3*j/2 +abs(j)/2; fi; end;
A002264 := n->floor(n/3): A079944 := n->floor(log[2](4*(n+2)/3))-floor(log[2](n+2)): A000523 := n->floor(log[2](n)): f := n->A079944(A002264(n-4)): g := n->A000523(A002264(n+2)/2): A079000 := proc(n) if n>3 then RETURN(simplify(3*n+3-3*2^g(n)+(-1)^f(n)*(9*2^g(n)-n-3))/2) else if n>0 then RETURN([1, 4, 6][n]) else RETURN(0) fi fi: end;
MATHEMATICA
a[1] = 1; a[n_] := (k = Floor[Log[2, (n+3)/6]]; j = n-(9*2^k - 3); 12*2^k-3 + 3*j/2 + Abs[j]/2); Table[a[n], {n, 1, 71}] (* Jean-François Alcover, May 21 2012, after Maple *)
CROSSREFS
KEYWORD
easy,nice,nonn,changed
AUTHOR
Matthew Vandermast, Feb 01 2003
STATUS
approved