A381214 a(n) is the difference between the largest and smallest element of the set of bases and exponents (including exponents = 1) in the prime factorization of n.
1, 2, 0, 4, 2, 6, 1, 1, 4, 10, 2, 12, 6, 4, 2, 16, 2, 18, 4, 6, 10, 22, 2, 3, 12, 0, 6, 28, 4, 30, 3, 10, 16, 6, 1, 36, 18, 12, 4, 40, 6, 42, 10, 4, 22, 46, 3, 5, 4, 16, 12, 52, 2, 10, 6, 18, 28, 58, 4, 60, 30, 6, 4, 12, 10, 66, 16, 22, 6, 70, 1, 72, 36, 4, 18
Offset: 2
Examples
a(36) = 1 because 36 = 2^2*3^2, the set of these bases and exponents is {2, 3} and 3 - 2 = 1. a(31500) = 6 because 31500 = 2^2*3^2*5^3*7^1, the set of these bases and exponents is {1, 2, 3, 5, 7} and 7 - 1 = 6.
Links
- Paolo Xausa, Table of n, a(n) for n = 2..10000
Crossrefs
Programs
-
Mathematica
A381214[n_] := Max[#] - Min[#] & [Flatten[FactorInteger[n]]]; Array[A381214, 100, 2]
-
PARI
a(n) = my(f=factor(n), s=setunion(Set(f[,1]), Set(f[,2]))); vecmax(s) - vecmin(s); \\ Michel Marcus, Feb 20 2025