OFFSET
1,3
COMMENTS
On the dual isomorphism [n, n*] this function represents n* - see A091934.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
Join[{0}, Table[If[PrimeQ[n], n - 1, Divisors[n][[-2]]], {n, 2, 100}]] (* T. D. Noe, Dec 04 2012 *)
PROG
(Haskell)
a220096 n = if z == 1 then n - 1 else z where z = a032742 n
-- Reinhard Zumkeller, Nov 23 2014
(PARI) a(n) = if (n==1, 0, isprime(n), n-1, my(d=divisors(n)); d[#d-1]); \\ Michel Marcus, Dec 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Dec 04 2012
STATUS
approved