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”).

A363828
Highest power of 2 dividing n which is < sqrt(n), for n >= 2; a(1) = 1.
1
1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4
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