OFFSET
1,1
EXAMPLE
a(8)=0 because the 15th composite is 30 and no prime is congruent to 15 (mod 30).
MATHEMATICA
f[n_] := Block[{k = 1, m = FixedPoint[2n + PrimePi[ # ] &, 2n - 1]}, While[k < 100000 && Mod[Prime[k], m] != 2n - 1, k++ ]; If[k == 100000, 0, Prime[k]]]; Table[ f[n], {n, 67}] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 15 2005
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Nov 17 2005
STATUS
approved