OFFSET
1,1
COMMENTS
A006530(k) is the largest prime factor of k.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
26 is in the sequence because the largest prime factors of 25, 26, and 27 are 5, 13, and 3, respectively.
MAPLE
gpf:= n -> max(numtheory:-factorset(n)):
L:= map(gpf, [$1..1000]):
select(t -> L[t]<> t and L[t]>L[t-1] and L[t]>L[t+1], [$2..nops(L)-1]); # Robert Israel, Jul 12 2018
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` mxp[x_] :=Max[PrimeFactorList[x]]; lf[x_] :=Length[PrimeFactorList[x]]; ta={{0}}; Do[s1=mxp[n-1]; s=mxp[n]; s2=mxp[n+1]; If[Greater[s, s1]&&Greater[s, s2]&&!PrimeQ[n], Print[{n, {s1, s, s2}}]; ta=Append[ta, n]], {n, 1, 1000}]; ta=Delete[ta, 1]
Select[Flatten[Position[Partition[Table[FactorInteger[n][[-1, 1]], {n, 400}], 3, 1], _?(#[[1]]< #[[2]]> #[[3]]&), 1, Heads->False]], CompositeQ[#+1]&]+1 (* Harvey P. Dale, May 10 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Dec 14 2004
EXTENSIONS
Edited by Don Reble, Jun 13 2007
STATUS
approved