cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A363827 Highest power of 2 dividing n which is <= sqrt(n).

Original entry on oeis.org

1, 1, 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, 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, 1, 2, 1, 8, 1, 2, 1, 4
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 19 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Last[Select[Divisors[n], # <= Sqrt[n] && IntegerQ[Log[2, #]] &]], {n, 100}]
    a[n_] := 2^Min[IntegerExponent[n, 2], Floor[Log2[n]/2]]; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
  • 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

Formula

a(n) = 2^min(A007814(n), A102572(n)). - Kevin Ryde, Oct 20 2023