OFFSET
1,6
MATHEMATICA
Join[{1}, Table[Last[Select[Divisors[n], # < Sqrt[n] && IntegerQ[Log[2, #]] &]], {n, 2, 100}]]
a[n_] := 2^Min[IntegerExponent[n, 2], Ceiling[Log2[n]/2] - 1]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
PROG
(PARI) a(n) = if (n==1, 1, vecmax(select(x->((x^2 < n) && (2^logint(x, 2)==x)), divisors(n)))); \\ Michel Marcus, Oct 19 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Oct 19 2023
STATUS
approved