login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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