A375032 The maximum odd exponent in the prime factorization of n, or 0 if no such exponent exists.
0, 1, 1, 0, 1, 1, 1, 3, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 3, 0, 1, 3, 1, 1, 1, 1, 5, 1, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 0, 1, 1, 1, 3, 1
Offset: 1
Links
Programs
-
Mathematica
a[n_] := Max[0, Max[Select[FactorInteger[n][[;; , 2]], OddQ]]]; a[1] = 0; Array[a, 100]
-
PARI
a(n) = {my(e = select(x -> (x % 2), factor(n)[,2])); if(#e == 0, 0, vecmax(e));}
Formula
a(n) = 0 if and only if n is a square (A000290).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=0} (2*k+1) * d(k) = 1.30000522546018852138..., where d(k) is defined in the Comments section above.
Comments