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.

A383032 Exponent of the highest power of 2 dividing the n-th number that is either a square or twice a square.

Original entry on oeis.org

0, 1, 2, 3, 0, 4, 1, 0, 5, 2, 0, 1, 6, 3, 0, 1, 2, 0, 7, 4, 1, 0, 2, 3, 0, 1, 8, 5, 0, 2, 1, 0, 3, 4, 0, 1, 2, 9, 0, 6, 1, 0, 3, 2, 1, 0, 4, 5, 0, 1, 2, 0, 3, 10, 1, 0, 7, 2, 0, 1, 4, 3, 0, 2, 1, 0, 5, 6, 0, 1, 2, 3, 0, 1, 4, 0, 11, 2, 1, 0, 8, 3, 0, 1, 2, 5, 0
Offset: 1

Views

Author

Amiram Eldar, Apr 13 2025

Keywords

Comments

The first position of k in this sequence, for k >= 0, is A001521(k+1).

Crossrefs

Programs

  • Mathematica
    With[{m = 3000}, IntegerExponent[Union[Join[Range[Floor[Sqrt[m]]]^2, 2*Range[Floor[Sqrt[m/2]]]^2]], 2]]
  • PARI
    lista(nn) = apply(x->valuation(x,2), vecsort(concat(vector(sqrtint(nn\1), i, i^2), vector(sqrtint(nn\2), i, 2*i^2)))); \\ Michel Marcus, Apr 13 2025

Formula

a(n) = A007814(A028982(n)).
a(A001954(n)) = 0 for n >= 0.
a(A215247(n)) = 1 for n >= 1.
a(A342280(n)) = 2 for n >= 0.
Sum_{k=1..n} a(k) ~ (1 + sqrt(2)) * n.