# 3 consecutive primes with distance ratio maximized

Thu May 29 17:10:02 CEST 2003

```SeqFans,

I just submitted the following 2 (prenumbered) sequences:

%I A084105
%S A084105 3 29 113 139 199 523 1151 1669 2971 6947 10007 16141
25471 40639 79699 102761 173359 265621 404851 838249
%N A084105 Middle of 3 consecutive primes producing a lower record of
the distance ratio to its neighbors.
%C A084105 Are there entries other than a(3), for which the smaller
difference exceeds 2?
%H A084105 Hugo Pfoertner, <a
href="http://www.randomwalk.de/sequences/a084105.txt">Maximally
asymmetric prime triplets, Fortran program</a>
%e A084105 a(3)=113 because the ratio (113-109)/(127-113)=2/7=0.28571..
is smaller than the previous minimum produced by
(31-29)/(29-23)=1/3=0.33333...
%Y A084105 Cf. A084106, A031132, A008996, A002386
%O A084105 1
%K A084105 ,more,nonn,
%A A084105 Hugo Pfoertner (hugo at pfoertner.org), May 29 2003

and

%I A084106
%S A084106 2 6 7 10 12 18 22 24 28 30 34 42 52 54 58 60 70 82 90 100
%N A084106 Inverse length ratio of differences to neighbors for record
producing maximally asymmetric prime triplets.
%C A084106 The ratio is given by 2/a(n). If the smaller difference is
not 2 for
some higher sequence term a re-definition of the sequence might be
necessary.
%e A084106 a(5)=12 because the larger difference between A084105(5)=199
and its
prime neighbors 197 and 211 is 211-199=12.
a(3)=7 is the special case where the prime neighbors of A084105(3)=113
are 109 and 127. The ratio 2/a(3) can be written as (113-109)/(127-113)
--> a(3)=7
%p A084106 See link given in A084105.
%Y A084106 Cf. A084105
%O A084106 1
%K A084106 ,more,nonn,
%A A084106 Hugo Pfoertner (hugo at pfoertner.org), May 29 2003

I am not very happy about the wording; some help
in improving it would be highly welcome.

Also both sequences need more terms and a check
if there are record producing triplets with
smaller interval lenghts > 2.

For convenience I include the Fortran program
and result referenced in the link.

c Look for 3 consecutive primes with record setting
c asymmetric location of the middle prime.
c Author: Hugo Pfoertner, http://www.pfoertner.org/
c
c Version history:
c 29.05.2003 Initial version
c
implicit integer (a-z)
parameter (msp=100007)
c list of small primes
integer sp(0:msp)
doubleprecision q, qm
c list taken from
c http://www.utm.edu/research/primes/lists/small/100000.txt
open ( unit=10, file='100000.txt', form='formatted' )
close (unit=10)
c search for decreasing quotient shorter/longer distance
c to neighbor primes
qm = 1.0
do 100 i = 1, msp-1
dl = sp(i)-sp(i-1)
dr = sp(i+1)-sp(i)
q = dble(min(dl,dr))/dble(max(dl,dr))
if ( q .lt. qm ) then
qm = q
write (*,1000) dl, dr, max(dl,dr), q, sp(i), i
1000    format ( 3i8, f8.5, i8, i6 )
endif
100   continue
end
C---------------------------------------------------------
C Results:
1       2       2 0.50000       3     1
6       2       6 0.33333      29     9
4      14      14 0.28571     113    29
2      10      10 0.20000     139    33
2      12      12 0.16667     199    45
2      18      18 0.11111     523    98
22       2      22 0.09091    1151   189
2      24      24 0.08333    1669   262
2      28      28 0.07143    2971   428
30       2      30 0.06667    6947   890
34       2      34 0.05882   10007  1229
2      42      42 0.04762   16141  1878
2      52      52 0.03846   25471  2809
2      54      54 0.03704   40639  4259
2      58      58 0.03448   79699  7809
60       2      60 0.03333  102761  9834
2      70      70 0.02857  173359 15782
2      82      82 0.02439  265621 23282
2      90      90 0.02222  404851 34214
2     100     100 0.02000  838249 66761

Thanks for any suggestions

Hugo

```