login
A062977
Difference between largest and smallest positive exponent in prime factorization of n; a(1) = 0 by convention.
5
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 4, 0, 1, 1, 0, 0, 0, 0, 2, 0
OFFSET
1,24
FORMULA
a(n) = A051903(n) - A051904(n).
a(A108951(n)) = A325226(n) = A001222(n) - A071178(n). - Antti Karttunen, Nov 17 2019
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A033150 - 1 = 0.705211... . - Amiram Eldar, Jan 05 2024
EXAMPLE
a(24) = 2 since 24 = 2^3*3^1 and max(3,1) - min(3,1) = 3 - 1 = 2;
a(25) = 0 since 25 = 5^2 and max(2) - min(2) = 2 - 2 = 0.
MATHEMATICA
dlsp[n_]:=Module[{xp=FactorInteger[n][[All, 2]]}, Max[xp]-Min[xp]]; Join[ {0}, Array[ dlsp, 120]] (* Harvey P. Dale, Jan 28 2021 *)
PROG
(PARI) { for (n=1, 4000, if (n<2, M=m=0, f=factor(n)~; M=m=f[2, 1]; for (i=2, length(f), M=max(M, f[2, i]); m=min(m, f[2, i]))); write("b062977.txt", n, " ", M - m) ) } \\ Harry J. Smith, Aug 14 2009
(PARI) A062977(n) = if((1==n), 0, n=(factor(n)[, 2]); vecmax(n)-vecmin(n)); \\ Antti Karttunen, Nov 17 2019
CROSSREFS
Cf. A072774 (positions of zeros), A059404 (of nonzeros).
Sequence in context: A003196 A319581 A331302 * A357879 A072325 A294929
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jul 24 2001
STATUS
approved