OFFSET
0,1
COMMENTS
The least prime which has n prime prime residues.
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
MAPLE
N:= 100: # for a(0)..a(N)
count:= 0: B:= Array(0..N): p:= 1:
for i from 1 while count < N+1 do
p:= nextprime(p);
P[i]:= p;
v:= nops(select(isprime, [seq(p mod P[j], j=1..i-1)]));
if v <= N and B[v] = 0 then
B[v]:= p; count:= count+1;
fi
od:
convert(B, list); # Robert Israel, Oct 23 2020
MATHEMATICA
f[n_] := Length[ Select[ Mod[ Prime[n], Prime[ Range[n]]], PrimeQ[ # ] &]]; g[n_] := Block[{k = 1}, While[ f[ k] != n, k++ ]; Prime[k]]; Table[ g[n], {n, 0, 48}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 28 2005
STATUS
approved