OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) is asymptotic to n*(sqrt(3)-1); conjecture: (a(n)-n*(sqrt(3)-1))/log(n) is bounded.
MAPLE
f:= proc(n) option remember;
n - procname(procname(ceil(n/2)))
end proc:
f(1):= 1:
seq(f(n), n=1..100); # Robert Israel, Oct 24 2017
MATHEMATICA
Fold[Append[#1, #2 - #1[[#1[[Ceiling[#2/2] ]] ]] ] &, {1}, Range[2, 74]] (* Michael De Vlieger, Oct 24 2017 *)
PROG
(PARI) a(n)=if(n<2, 1, n-a(a(ceil(n/2))))
(Magma) [n eq 1 select 1 else n-Self(Self(Ceiling(n/2))): n in [1..80]]; // Vincenzo Librandi, Oct 25 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 16 2003
STATUS
approved