login
A076563
a(n) = n - greatest prime divisor of n, for n>1.
12
0, 0, 2, 0, 3, 0, 6, 6, 5, 0, 9, 0, 7, 10, 14, 0, 15, 0, 15, 14, 11, 0, 21, 20, 13, 24, 21, 0, 25, 0, 30, 22, 17, 28, 33, 0, 19, 26, 35, 0, 35, 0, 33, 40, 23, 0, 45, 42, 45, 34, 39, 0, 51, 44, 49, 38, 29, 0, 55, 0, 31, 56, 62, 52, 55, 0, 51, 46, 63, 0, 69, 0, 37, 70, 57, 66, 65, 0, 75
OFFSET
2,3
LINKS
FORMULA
a(p) = 0 for prime p.
a(n) = n - A006530(n). - Michel Marcus, Jan 16 2015
MATHEMATICA
Table[n-Last@(First/@FactorInteger[n]), {n, 2, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
PROG
(PARI) a(n) = n - vecmax(factor(n)[, 1]); \\ Michel Marcus, Aug 07 2022
(Python)
from sympy import factorint
def a(n): return n - max(factorint(n))
print([a(n) for n in range(2, 81)]) # Michael S. Branicky, Aug 07 2022
CROSSREFS
Sequence in context: A130628 A249431 A331176 * A163974 A317443 A308218
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Oct 19 2002
STATUS
approved