login
A383032
Exponent of the highest power of 2 dividing the n-th number that is either a square or twice a square.
3
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,3
COMMENTS
The first position of k in this sequence, for k >= 0, is A001521(k+1).
LINKS
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.
MATHEMATICA
With[{m = 3000}, IntegerExponent[Union[Join[Range[Floor[Sqrt[m]]]^2, 2*Range[Floor[Sqrt[m/2]]]^2]], 2]]
PROG
(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
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Apr 13 2025
STATUS
approved