OFFSET
1,10
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
EXAMPLE
a(105)=2: prime divisors of 105 are 3,5,7; distance between successive pairs: 5-3=2 and 7-5=2; mean of 2 and 2 is 2.
If n=30 the mean is 1.5 and rounding up, a(30)=2.
MATHEMATICA
Table[Ceiling[Mean[Differences[FactorInteger[n][[All, 1]]]/.{}->{0, 0}]], {n, 100}] (* Harvey P. Dale, Jun 26 2021 *)
PROG
(PARI) A049087(n) = if(1>=omega(n), 0, my(ps = factor(n)[, 1], s = 0); for(i=2, #ps, s += (ps[i]-ps[i-1])); ceil(s/(#ps-1))); \\ Antti Karttunen, Sep 07 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved