OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..4262
EXAMPLE
The 6th composite is 12=2^2*3 with largest prime factor 3, and the largest prime factor of the index 6=2*3 is also 3, which adds 12 to the sequence.
The 7th composite is 14=2*7 with largest prime factor 7, and the largest prime factor of the index 7 is also 7, which adds 14 to the sequence.
MAPLE
A006530 := proc(n) sort(convert(numtheory[factorset](n), list)); op(-1, %) ; end:
A002808 := proc(n) if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end:
for n from 1 to 10000 do if A052369(n) = A006530(n) then printf("%d, ", A002808(n)) ; fi; od: # R. J. Mathar, Aug 14 2009
# More efficient alternative:
N:= 10000: # to get terms <= N
Lpf:= [seq(max(numtheory:-factorset(n)), n=1..N)]:
comps:= select(n -> Lpf[n]<n, [$4..N]):
map(proc(n) if Lpf[n]=Lpf[comps[n]] then comps[n] fi end proc,
[$1..nops(comps)]); # Robert Israel, Mar 05 2018
MATHEMATICA
lpf[n_] := FactorInteger[n ][[-1, 1]];
cc = Select[Range[10000], CompositeQ];
Select[{Range[Length[cc]], cc} // Transpose, lpf[#[[1]]] == lpf[#[[2]]]&][[All, 2]] (* Jean-François Alcover, Aug 19 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jun 24 2009
EXTENSIONS
Corrected and extended by R. J. Mathar, Aug 14 2009
STATUS
approved