A375933 The second-largest exponent in the prime factorization of n, or 0 if it does not exist.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0
Offset: 1
Examples
12 = 2^2 * 3^1 has 2 exponents in its prime factorization: 1 and 2. 2 is the largest and 1 is the second-largest. Therefore a(12) = 1.
Links
Programs
-
Mathematica
a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, Max[0, Max[Select[e, # < Max[e] &]]]]; Array[a, 100]
-
PARI
a(n) = if(n == 1, 0, my(e = factor(n)[,2]); e = select(x -> x < vecmax(e), e); if(#e == 0, 0, vecmax(e)));
Formula
a(n) = 0 if and only if n is a power of a squarefree number (A072774).
a(n) = 1 if and only if n is in A375934.
a(n) <= A051903(n), with equality if and only if n = 1.
a(n!) = A054861(n) for n != 3.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{i >= 1} i * d(i) = 0.42745228287872473252..., where d(i) = Sum_{j >= i+1} d_2(i, j) and d_2(i, j) = Product_{p prime} (1 - 1/p^(i+1) + 1/p^j - 1/p^(j+1)) - Product_{p prime} (1 - 1/p^(i+1)) + [i > 1] * (Product_{p prime} (1 - 1/p^i) - Product_{p prime} (1 - 1/p^i + 1/p^j - 1/p^(j+1))), and [] is the Iverson bracket.
Comments