login
A375933
The second-largest exponent in the prime factorization of n, or 0 if it does not exist.
4
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,72
COMMENTS
First differs from A363127 at n = 60, and from A363131 at n = 72.
The position of the first occurrence of k = 1, 2, ..., is A167747(k+1) = 2*6^k.
FORMULA
a(n) = A051903(A375932(n)).
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.
EXAMPLE
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.
MATHEMATICA
a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, Max[0, Max[Select[e, # < Max[e] &]]]]; Array[a, 100]
PROG
(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)));
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Sep 03 2024
STATUS
approved