cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A049087 Ceiling of mean distance between successive distinct prime divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			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.
		

Crossrefs

Cf. also A178921.

Programs

  • Mathematica
    Table[Ceiling[Mean[Differences[FactorInteger[n][[All,1]]]/.{}->{0,0}]],{n,100}] (* Harvey P. Dale, Jun 26 2021 *)
  • 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
Showing 1-1 of 1 results.