OFFSET
1,7
COMMENTS
It appears that a(n) <= ceiling(sqrt(n)).
Comments from N. J. A. Sloane, Feb 12 2016: (Start)
In fact it appears that a(n) <= floor(sqrt(n)) except when n belongs to the sequence S := [99, 120, 142, 167, 193, 222, 252, 285, 319, ...], which has second differences 1,3,1,3,1,3,... and is the sequence {99; A035608(k)+21*k+120, k>=0}. For these values of n it appears that a(n) = ceiling(sqrt(n)). The first example is a(99) = 10 = ceiling(sqrt(99)).
The zeros occur at positions [2, 3, 8, 13, 19, 28, 38, 51, 65, 82, 100, 121, 143, 168, 194, 223, 253, 286, 320, ...], which apart from the initial terms appears to be S+1.
Without the division by 2 in the definition (that is, if a(n+1)=m), we get A158416. (End)
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..3000, Feb 12 2016 [First 998 terms from David Seelmann]
EXAMPLE
a(2) is equal to the number of times a(1) = 1 appears in the sequence before, divided by two, rounding down. Since 1 appears once before, a(2) = floor(1/2) = 0.
a(3) is equal to the number of times 0 appears in the sequence before, which is again once, divided by two, rounding down. So a(3) = floor(1/2) = 0.
a(4) is the number of times 0 appears before (twice) divided by two, which gives us 1.
MATHEMATICA
a = {1}; Do[AppendTo[a, Floor[Count[a, n_ /; n == a[[k - 1]]]/2]], {k, 2, 120}]; a (* Michael De Vlieger, Feb 11 2016 *)
CROSSREFS
AUTHOR
David Seelmann, Feb 11 2016
EXTENSIONS
More terms from Michael De Vlieger, Feb 11 2016
STATUS
approved