OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
If floor(log_2(n))=2k+1, then a(n) = floor(n/2^k). If floor(log_2(n))=2k, then a(n) = 2^k.
EXAMPLE
a(50)=floor(50/a(25))
..... a(25)=floor(25/a(12))
........... a(12)=floor(12/a(6))
................. a(6)=floor(6/a(3))
...................... a(3)=floor(3/a(1))
........................... a(1)=1
...................... a(3)=floor(3/a(1))=floor(3/1)=3
................. a(6)=floor(6/a(3))=floor(6/3)=2
........... a(12)=floor(12/a(6))=floor(12/2)=6
..... a(25)=floor(25/a(12))=floor(25/6)=4
a(50)=floor(50/a(25))=floor(50/4)=12.
MAPLE
f:= proc(n) option remember; floor(n/procname(floor(n/2))) end proc:
f(1):= 1:
map(f, [$1..200]); # Robert Israel, Jan 06 2021
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Floor[n/a[Floor[n/2]]]; Table[ a[n], {n, 94}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller and Robert G. Wilson v, Jul 21 2004
EXTENSIONS
Formula added by Max Alekseyev, Mar 02 2011
STATUS
approved