OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..325
EXAMPLE
a(3)=23 because A329308(23)=3 and 23 is the least prime with this property.
MAPLE
f:= proc(n) local k; nops(select(isprime, [seq(n mod k^2, k=2..floor(sqrt(n)))])) end proc:
V:= Array(0..100): count:= 0: p:= 0:
while count < 101 do
p:= nextprime(p);
v:= f(p);
if v <= 100 and V[v]=0 then
count:= count+1; V[v]:= p;
fi
od:
convert(V, list);
MATHEMATICA
b[n_] := b[n] = (* A329309 *) Select[Range[2, Sqrt[n] // Floor], PrimeQ[ Mod[n, #^2]]&] // Length;
a[n_] := For[p = 2, True, p = NextPrime[p], If[b[p] == n, Print[n, " ", p]; Return[p]]];
a /@ Range[0, 100] (* Jean-François Alcover, Aug 22 2020 *)
PROG
(Magma) a:=[]; for n in [0..50] do p:=2; while #[ k:k in [2..Floor(Sqrt(p))]| IsPrime(p mod k^2) ] ne n do p:=NextPrime(p); end while; Append(~a, p); end for; a; // Marius A. Burtea, Nov 11 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 09 2019
STATUS
approved