OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(6) = 5 because 5 is the smallest prime which is both greater than the smallest prime dividing 6, which is 2 and is coprime to 6.
MATHEMATICA
a[1] := 2; a[n_] := Module[{}, k = PrimePi[FactorInteger[n][[1, 1]]]; k++; While[Not[GCD[Prime[k], n] == 1 ], k++ ]; Prime[k]]; Table[a[i], {i, 1, 80}] (* _Stefan Steinerberger_ and Patrick Hanslmaier, Jun 03 2007 *)
spdn[n_]:=Module[{s=FactorInteger[n][[1, 1]], p}, p=NextPrime[s]; While[ !CoprimeQ[ p, n], p=NextPrime[p]]; p]; Array[spdn, 80] (* _Harvey P. Dale_, Feb 18 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
_Leroy Quet_, Mar 10 2006
EXTENSIONS
More terms from _Stefan Steinerberger_ and Patrick Hanslmaier, Jun 03 2007
STATUS
approved