login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A079411
a(1)=1, a(n) = n - a(a(ceiling(n/2))).
2
1, 1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25, 26, 26, 27, 27, 28, 29, 30, 30, 31, 31, 32, 33, 34, 34, 35, 35, 36, 36, 37, 38, 39, 39, 40, 40, 41, 42, 43, 43, 44, 44, 45, 46, 47, 47, 48, 49, 50, 51, 52, 53, 54
OFFSET
1,3
LINKS
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
Cf. A076895.
Sequence in context: A309250 A365339 A046108 * A360744 A198454 A063882
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 16 2003
STATUS
approved