login
A049087
Ceiling of mean distance between successive distinct prime divisors of n.
2
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 5, 2, 0, 0, 1, 0, 3, 4, 9, 0, 1, 0, 11, 0, 5, 0, 2, 0, 0, 8, 15, 2, 1, 0, 17, 10, 3, 0, 3, 0, 9, 2, 21, 0, 1, 0, 3, 14, 11, 0, 1, 6, 5, 16, 27, 0, 2, 0, 29, 4, 0, 8, 5, 0, 15, 20, 3, 0, 1, 0, 35, 2, 17, 4, 6, 0, 3, 0, 39, 0, 3, 12, 41, 26, 9, 0, 2, 6, 21, 28, 45
OFFSET
1,10
LINKS
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
Cf. also A178921.
Sequence in context: A331332 A300228 A100573 * A178921 A046665 A100574
KEYWORD
easy,nonn
AUTHOR
STATUS
approved