OFFSET
1,1
COMMENTS
In general P(k)=k-th prime=k+n where n is the index of the composite P(k)+1 (k>=2)
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5)=43 because 43+1=44=C(29) and 29 is prime.
MATHEMATICA
Module[{nn=3000, cmps, pcmps, c}, cmps=Select[Range[nn], CompositeQ]; pcmps=Thread[{Range[Length[cmps]], cmps}]; c=Select[pcmps, PrimeQ[ #[[1]]]&][[;; , 2]]; Select[ Prime[ Range[ nn]], MemberQ[c, #+1]&]]//Rest (* Harvey P. Dale, Mar 17 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robin Garcia, Dec 24 2004
STATUS
approved
