OFFSET

1,1

COMMENTS

If (but not only if) n is squarefree, then a(n) is coprime to n.

Largest semiperimeter of rectangle of area n. If n is prime, a(n) = n+1. - N. J. A. Sloane, Jun 14 2019

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

FORMULA

EXAMPLE

12's largest proper divisor is 6. 12's smallest prime divisor is 2. So a(12) = 6 + 2 = 8.

MATHEMATICA

f[n_] := Divisors[n][[ -2]] + FactorInteger[n][[1, 1]]; Table[ f[n], {n, 2, 74}] (* Robert G. Wilson v *)

PROG

(Python)

from sympy import factorint

A111234_list = [2] + [a+b//a for a, b in ((min(factorint(n)), n) for n in range(2, 10001))] # Chai Wah Wu, Jun 14 2019

(PARI) a(n) = if (n==1, 2, my(p=factor(n)[1, 1]); n/p + p); \\ Michel Marcus, Jun 14 2019

CROSSREFS

KEYWORD

nonn

AUTHOR

Leroy Quet, Oct 28 2005

EXTENSIONS

More terms from Robert G. Wilson v, Oct 31 2005

Added a(1) = 2. - N. J. A. Sloane, Jun 14 2019

STATUS

approved