OFFSET
0,1
COMMENTS
a(n) is the least prime p such that there are exactly n pairs of primes (q,r) with 2*q+r = p and r < 2*q.
LINKS
Robert Israel, Table of n, a(n) for n = 0..808
EXAMPLE
a(3) = 41 because 41 is prime and there are exactly 3 such triangles with perimeter 41, namely with sides (19,19,3), (17,17,7) and (11,11,19).
MAPLE
N:= 10000: # for terms before the first term > N
V:= Vector(N):
p:= 1;
do
p:= nextprime(p);
if 2*p >= N then break fi;
q:= floor(p/2);
do
q:= nextprime(q);
r:= 2*q+p;
if r > N then break fi;
if isprime(r) then V[r]:= V[r]+1 fi;
od
od:
m:= max(V):
A:= Array(0..m):
A[0]:= 2:
for n from 3 to N by 2 do
if A[V[n]] = 0 then A[V[n]]:= n fi
od:
L:= convert(A, list):
if member(0, L, 'm') then L[1..m-1] else L fi;
MATHEMATICA
f[p_] := Count[Select[Range[(p - 1)/2], PrimeQ], _?(PrimeQ[(p - #)/2] &)]; v = f /@ (p = Select[Range[10000], PrimeQ]); p[[TakeWhile[Table[FirstPosition[v, k][[1]], {k, 0, Max[v]}], NumericQ]]] (* Amiram Eldar, Aug 17 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 15 2021
STATUS
approved