OFFSET
1,2
COMMENTS
Each n > 1 occurs A025147(n) times in the sequence.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
MATHEMATICA
a = {1}; Do[AppendTo[a, If[BitAnd[n - 1, n - 2] == 0, Log2[n - 1] + 2, 2 + Floor[Log2[n - 1]] + a[[2 + BitXor[n - 1, 2^Ceiling[Log2[n]] - 1]]]]], {n, 2, 74}]; a (* Ivan Neretin, Jun 24 2016 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 30 2004
EXTENSIONS
Edited and extended by Antti Karttunen, Aug 25 2006
STATUS
approved