A100574 If n = product{p|n, p=prime} p^b(p,n), where each b(p,n) is a positive integer and the product is over distinct prime divisors of n, a(n) = difference between the maximum p^b(p,n) and minimum p^b(p,n).
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 5, 2, 0, 0, 7, 0, 1, 4, 9, 0, 5, 0, 11, 0, 3, 0, 3, 0, 0, 8, 15, 2, 5, 0, 17, 10, 3, 0, 5, 0, 7, 4, 21, 0, 13, 0, 23, 14, 9, 0, 25, 6, 1, 16, 27, 0, 2, 0, 29, 2, 0, 8, 9, 0, 13, 20, 5, 0, 1, 0, 35, 22, 15, 4, 11, 0, 11, 0, 39, 0, 4, 12, 41, 26, 3, 0, 7, 6, 19, 28
Offset: 1
Keywords
Examples
For 24 = 2^3 *3, 2^3 and 3 are separated by 5, so a(30) = 5.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Mathematica
pf[n_] := Block[{pb = Flatten[ Table[ #[[1]]^#[[2]], {1}] & /@ FactorInteger[n]]}, Max[pb] - Min[pb]]; Table[ pf[n], {n, 2, 100}] (* Robert G. Wilson v, Jan 10 2005 *)
-
PARI
A100574(n) = if(1==n,0,my(f=factor(n), v = vector(#f[, 1], i, f[i, 1]^f[i, 2])); vecmax(v)-vecmin(v)); \\ Antti Karttunen, Aug 06 2018
Formula
Extensions
More terms from Robert G. Wilson v, Jan 10 2005
Comments