login
A087040
2nd largest prime factor of n-th composite number.
3
2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 5, 2, 3, 2, 3, 2, 3, 2, 5, 3, 2, 3, 2, 3, 2, 3, 2, 2, 7, 5, 3, 2, 3, 5, 2, 3, 2, 3, 2, 3, 2, 5, 3, 2, 3, 5, 3, 2, 5, 2, 7, 3, 2, 3, 2, 3, 5, 2, 3, 2, 3, 7, 2, 3, 2, 5, 2, 7, 3, 5, 3, 2, 5, 2, 3, 5, 3, 2, 3, 5, 2, 3, 2, 7, 3, 11, 2, 3, 2, 5, 3, 2, 3, 5, 3, 7, 2, 3
OFFSET
1,1
COMMENTS
a(n) = A087039(A002808(n));
a(n) = A006530(A002808(n)/A052369(n)).
LINKS
MAPLE
f:= proc(n) local F;
if isprime(n) then return NULL fi;
F:= sort(ifactors(n)[2], (a, b) -> a[1]>b[1]);
if F[1][2] >= 2 then F[1][1] else F[2][1] fi
end proc:
map(f, [$2..200]); # Robert Israel, Feb 20 2024
MATHEMATICA
Table[l=FactorInteger[ResourceFunction["Composite"][n]]; If[Last[l][[2]]>1, Last[l][[1]], First[Part[l, -2]]], {n, 102}] (* James C. McMahon, Feb 20 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 01 2003
STATUS
approved