A383032 Exponent of the highest power of 2 dividing the n-th number that is either a square or twice a square.
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
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
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
Comments