OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Paul Erdős and J. H. van Lint, On the average ratio of the smallest and largest prime divisor of n, Indagationes Mathematicae (Proceedings), Vol. 85, No. 2 (1982), pp. 127-132.
FORMULA
a(n) >= n.
Sum_{k=1..n} k/a(k) ~ n/log(n) + 3*n/log(n)^2 + o(n/log(n)^2) (Erdős and van Lint, 1982). - Amiram Eldar, Oct 14 2022
MATHEMATICA
a[n_] := With[{pp = FactorInteger[n][[All, 1]]}, n*pp[[-1]]/pp[[1]]];
Array[a, 100] (* Jean-François Alcover, Nov 18 2021 *)
PROG
(PARI) a(n) = if (n==1, 1, my(f=factor(n)[, 1]~); n*vecmax(f)/vecmin(f)); \\ Michel Marcus, Sep 24 2022
(Python)
from sympy import factorint
def a(n): f = factorint(n); return 1 if n == 1 else n//min(f)*max(f)
print([a(n) for n in range(1, 67)]) # Michael S. Branicky, Sep 24 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 05 2007
STATUS
approved