login
A166250
a(n) = n-1 plus the largest proper divisor of n.
2
2, 3, 5, 5, 8, 7, 11, 11, 14, 11, 17, 13, 20, 19, 23, 17, 26, 19, 29, 27, 32, 23, 35, 29, 38, 35, 41, 29, 44, 31, 47, 43, 50, 41, 53, 37, 56, 51, 59, 41, 62, 43, 65, 59, 68, 47, 71, 55, 74, 67, 77, 53, 80, 65, 83, 75, 86, 59, 89, 61, 92, 83, 95, 77, 98, 67, 101, 91, 104, 71, 107
OFFSET
2,1
LINKS
FORMULA
a(n) = n - 1 + A032742(n).
MAPLE
A032742 := proc(n) if n = 1 then 1; else max(op(numtheory[divisors](n) minus {n})) ; fi; end:
A166250 := proc(n) n-1+A032742(n) ; end: seq(A166250(n), n=2..80) ; # R. J. Mathar, Oct 21 2009
MATHEMATICA
f[n_]:=n+Divisors[n+1][[Length[Divisors[n+1]]-1]]; Table[f[n], {n, 2, 6!}] (* Vladimir Joseph Stephan Orlovsky, Mar 03 2010 *)
Table[n+Divisors[n][[-2]]-1, {n, 2, 80}] (* Harvey P. Dale, Jul 21 2015 *)
PROG
(PARI) a(n) = my(d = divisors(n)); n - 1 + d[#d-1]; \\ Michel Marcus, May 08 2016
CROSSREFS
Equals A338281(n)-1.
Sequence in context: A063914 A209187 A357259 * A174088 A304493 A208323
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Arbitrarily-defined a(1) removed by R. J. Mathar, Oct 21 2009
STATUS
approved