login
A076820
Second-largest distinct prime dividing n (or 1 if n is a power of a prime).
2
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 3, 2, 5, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 5, 2, 3, 2, 1, 3, 1, 2, 3, 1, 5, 3, 1, 2, 3, 5, 1, 2, 1, 2, 3, 2, 7, 3, 1, 2, 1, 2, 1, 3, 5, 2, 3, 2, 1, 3, 7, 2, 3, 2, 5, 2, 1, 2, 3, 2, 1, 3, 1, 2, 5
OFFSET
1,6
COMMENTS
The 3rd-largest is 1 except 2 at 30, 42, 60, 66, 70, ...
LINKS
FORMULA
If p_1 < p_2 < ... <p_{k-1} < p_k are the distinct primes dividing n then a(n) = p_{k-1}.
PROG
(PARI) A076820(n) = { my(o=omega(n)); if(1>=o, 1, factor(n)[o-1, 1]); }; \\ Antti Karttunen, Sep 25 2018
CROSSREFS
KEYWORD
nonn,easy,look
AUTHOR
R. K. Guy, Nov 19 2002
EXTENSIONS
More terms from Jason Earls and John W. Layman, Nov 21 2002
STATUS
approved