OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 100:
A:= Vector(N):
p:= 2:
do
p:= nextprime(p);
if p > N then break fi;
R:= select(k -> A[k] = 0, [$1..N]);
S:= select(`<=`, R, N/p);
A[p*S]:= Vector(p*R[2..1+nops(S)]);
od:
for k from 0 to ilog2(N) do A[2^k]:= 2^(k+1) od:
convert(A, list); # Robert Israel, Oct 25 2017
MATHEMATICA
sopf[n_] := SelectFirst[FactorInteger[n][[All, 1]], # > 2&];
a[n_] := For[p = sopf[n]; m = n+1, True, m++, If[p == sopf[m], Return[m]]];
Array[a, 100] (* Jean-François Alcover, Mar 09 2019 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Jan 09 2003
STATUS
approved