OFFSET
2,9
COMMENTS
The (sample) standard deviation sigma of {x_1,...,x_n} is calculated from sigma^2 = 1/(n-1) * sum_{1,...,n}(x_i - mu)^2, where mu denotes the average of {x_1,...,x_n}.
EXAMPLE
24 = 2^3 * 3^1, so the corresponding average = (2 + 2 + 2 + 3)/ 4 = 2.25 and the standard deviation is [(1/3){3 * (2-2.25)^2 + (3-2.25)^2}]^0.5 = 0.5, which rounds to 1. So a(24) = 1.
MATHEMATICA
<<Statistics`NormalDistribution` f[n_] := Flatten[Table[ #[[1]], {#[[2]]}]&/@FactorInteger[n]]; a[n_] := If[PrimeQ[n]||n==1, 0, Floor[StandardDeviation[f[n]]+1/2]]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Feb 02 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Feb 05 2002
Edited by Dean Hickerson, Feb 12 2002
STATUS
approved