login
A329309
a(n) is the first prime p such that A329308(p) = n.
2
2, 7, 11, 23, 43, 67, 83, 173, 167, 227, 367, 331, 503, 607, 727, 827, 1031, 1447, 1223, 1163, 1523, 1973, 2957, 2357, 1811, 3083, 3631, 3607, 4423, 5419, 6779, 5297, 6353, 7207, 7307, 7817, 9803, 6563, 8861, 8123, 10223, 10883, 13331, 10853, 14423, 14419, 17597, 15307, 15083, 15889, 21227, 19403
OFFSET
0,1
LINKS
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
Cf. A329308.
Sequence in context: A184799 A045374 A168032 * A217304 A179876 A088179
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 09 2019
STATUS
approved