[go: up one dir, main page]

login
A220096
a(1)=0, n-1 if n is prime, else largest proper divisor of n.
4
0, 1, 2, 2, 4, 3, 6, 4, 3, 5, 10, 6, 12, 7, 5, 8, 16, 9, 18, 10, 7, 11, 22, 12, 5, 13, 9, 14, 28, 15, 30, 16, 11, 17, 7, 18, 36, 19, 13, 20, 40, 21, 42, 22, 15, 23, 46, 24, 7, 25, 17, 26, 52, 27, 11, 28, 19, 29, 58, 30, 60, 31, 21, 32, 13, 33, 66, 34, 23, 35, 70
OFFSET
1,3
COMMENTS
On the dual isomorphism [n, n*] this function represents n* - see A091934.
LINKS
FORMULA
a(n) = if A220096(n) = 1 then n - 1 else A220096(n). - Reinhard Zumkeller, Nov 23 2014
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
Sequence in context: A113885 A113886 A334952 * A122376 A067240 A126080
KEYWORD
nonn
AUTHOR
Jon Perry, Dec 04 2012
STATUS
approved