[seqfan] Re: Differences of consecutive primes

Maximilian Hasler maximilian.hasler at gmail.com
Fri Jan 14 19:16:52 CET 2011


Oh sorry, I finally understand and confirm the value of a(8) = 77, i.e. the
sequence
1, 2, 3, 4, 7, 17, 18, 77, ...

defined as:
Numbers N such that there is K such that { g(1), ..., g(K) } = { 1,...,N }
for some K,
where g(k)=(prime(k+2)-prime(k+1))/2.


Below the list of gaps which were found, until the list [1,...,77] is
complete.
This happens for the gap of 2*75 with upper border p(887314)=13626407,
and remains "stable" until the gap of 2*90 occurs when prime
p(1094422)=17051887 is reached.
No further term for primes up to 2 x 10^9.

M.


Successively found gaps :  ([p_upper, gap/2])
[3, 1/2], [5, 1], [11, 2], [29, 3], [97, 4], [127, 7], [149, 5], [211, 6],
[541, 9], [907, 10], [1151, 11], [1361, 17], [1693, 12], [1847, 8], [2503,
13], [2999, 14], [4327, 15], [5623, 16], [9587, 18], [15727, 22], [16183,
21], [19373, 20], [19661, 26], [28277, 24], [30631, 19], [31469, 36],
[31957, 25], [34123, 31], [35671, 27], [43391, 30], [44351, 29], [81509,
23], [82129, 28], [89753, 32], [134581, 34], [156007, 43], [162209, 33],
[173429, 35], [188107, 39], [212777, 38], [265703, 41], [360749, 48],
[370373, 56], [396833, 50], [404671, 37], [404941, 45], [461801, 42],
[492227, 57], [542683, 40], [544367, 44], [604171, 49], [927961, 46],
[1098953, 53], [1101071, 47], [1349651, 59], [1357333, 66], [1388587, 52],
[1444411, 51], [1468387, 55], [1671907, 63], [1895479, 60], [2010881, 74],
[2238931, 54], [3117421, 61], [3826157, 69], [3851587, 64], [4652507, 77],
[5518817, 65], [5845309, 58], [6034393, 73], [6371537, 68], [6752747, 62],
[6958801, 67], [7621399, 70], [8421403, 76], [10343903, 71], [11981587, 72],
[13626407, 75]

Followed by
[17051887, 90], [17983873, 78], [20285263, 82], [20831533, 105], [27915907,
85], [33803849, 80], [36271783, 91], [37305881, 84], [38089453, 88],
[38394299, 86], [39175379, 81], [39390167, 89], [46006967, 99], [47326913,
110], [49269739, 79],...


For my own records, PARI code:
(the array 'a' is not needed here)
a=[];o=2;g=0;l=1;L=1;
forprime(p=3,default(primelimit), bittest(g,(-o+o=p)\2) & next;
a=concat(a,[[p,(p-precprime(p-1))/2]]); g+=1<<((p-precprime(p-1))\2);
a[#a][2]>L & L=a[#a][2]; l==a[#a][2] | next; while(bittest(g,l++),); l>L &
print1( L ", "))

or, beyond primelimit:
while(p=nextprime(p+1), bittest(g,(-o+o=p)\2) & next;
a=concat(a,[[p,(p-precprime(p-1))/2]]); g+=1<<((p-precprime(p-1))\2);
a[#a][2]>L & L=a[#a][2]; l==a[#a][2] | next; while(bittest(g,l++),); l>L &
print1( L ", "))



On Fri, Jan 14, 2011 at 12:58 PM, Aai <bradypus at xs4all.nl> wrote:

> FWIW, by trial and error and some reasoning I found a possible candidate
> for a(8):
>
> 1831<=K<=887314   --> 1,2,3,...., 77  --> a(8) = 77
>
>
>
> Hallo Veikko Pohjola, je schreef op 14-01-11 09:46:
>
>  Maybe I was not clear enough in presenting what I am searching for.
>>
>> I give two more examples
>>
>> 738<=K<=1182 -> {1,2,3,...,15,16,17} -> a(6)=17
>> 1183<=K<=1830 -> {1,2,3,...,16,17,18} -> a(7)=18
>>
>>
>>
>> The Mathematica program of Harvey is ok but gives actually the results
>> above. Thus, for instance, Range[n], {n, 31, 34} gives {1,2,3,4,7} and
>> Range[n], {n, 35, 46} gives {1,2,3,4,5,7}, which means that there is a gap
>> in the K-values from 30 to 45 which does not produce perfect sequences of
>> small integers, which are what I am looking for. Also the existence of the
>> gaps from 99 to 737 and from 1831 to somewhere are supported by the program.
>>
>> I am still wondering would there be a continuation for the sequence 1, 2,
>> 3, 4, 7, 17, 18,.
>> Veikko
>>
>>
>> _______________________________________________
>>
>> Seqfan Mailing list - http://list.seqfan.eu/
>>
>
> --
> Met vriendelijke groet,
> =@@i
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list