OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..65536
Altug Alkan, A line graph of a(n) for n <= 2500
MAPLE
b:= proc() 0 end:
a:= proc(n) option remember; local t;
t:= `if`(n<2, n, b(a(n-ilog2(n))));
b(t):= b(t)+1; t
end:
seq(a(n), n=0..200); # Alois P. Heinz, Jul 26 2018
MATHEMATICA
c = <||>; f[n_] := If[KeyExistsQ[c, n], c[n], 0]; a[n_] := a[n] = Block[{v}, v = If[n < 2, n, f[a[n - Floor@ Log2@ n]]]; If[f[v] > 0, c[v] = c[v] + 1, c[v] = 1]; v]; Array[a, 96, 0] (* Giovanni Resta, Jul 26 2018 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Jul 26 2018
STATUS
approved