login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347079 a(n) is the least prime that is the perimeter of exactly n isosceles triangles with prime sides. 1

%I #10 Aug 23 2021 12:16:35

%S 2,7,17,41,89,149,229,281,461,401,557,761,941,929,1061,1049,1321,1409,

%T 1747,1721,1901,2131,2237,2647,2531,2609,3203,3217,3089,3209,3257,

%U 3607,3739,4129,4733,4549,4721,4637,5441,4817,5557,5689,5393,6379,6977,6857,7393,7253,6961,7451,7901,7561,8609

%N a(n) is the least prime that is the perimeter of exactly n isosceles triangles with prime sides.

%C 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.

%H Robert Israel, <a href="/A347079/b347079.txt">Table of n, a(n) for n = 0..808</a>

%e 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).

%p N:= 10000: # for terms before the first term > N

%p V:= Vector(N):

%p p:= 1;

%p do

%p p:= nextprime(p);

%p if 2*p >= N then break fi;

%p q:= floor(p/2);

%p do

%p q:= nextprime(q);

%p r:= 2*q+p;

%p if r > N then break fi;

%p if isprime(r) then V[r]:= V[r]+1 fi;

%p od

%p od:

%p m:= max(V):

%p A:= Array(0..m):

%p A[0]:= 2:

%p for n from 3 to N by 2 do

%p if A[V[n]] = 0 then A[V[n]]:= n fi

%p od:

%p L:= convert(A,list):

%p if member(0,L,'m') then L[1..m-1] else L fi;

%t 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 *)

%K nonn

%O 0,1

%A _J. M. Bergot_ and _Robert Israel_, Aug 15 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 07:40 EDT 2024. Contains 372358 sequences. (Running on oeis4.)