A179985 Numbers N such that {A028334(2), ..., A028334(K)} = {1,...,N} for some K >= 2, where A028334(k) = (prime(k+1) - prime(k))/2.
1, 2, 3, 4, 7, 17, 18, 77
Offset: 1
Keywords
Examples
For k >= 2, consider A028334(k) = (1/2) * (prime(k+1) - prime(k)), half the k-th gap between primes. (We ignore g(1), which would equal 1/2.) Then, using k=2,...,24 (and up to k=29), all the values 1,2,3 and 4 occur. Therefore, a(4)=4 is in the sequence. However, for k=30 a new gap of 14 = 2*7 occurs, thus creating the "holes" (missing values) g=5 and g=6. The list of gaps has holes until one reaches k=46: At that moment all values g=1,...,7, and no other values occur. (This remains true up to k=98.) Therefore, a(5)=7 is in the list. For more examples, see link to posts by Veikko Pohjola.
Links
- Thomas R. Nicely, First occurrence prime gaps [For local copy see A000101]
- Veikko Pohjola et al., Differences of consecutive primes, seqfan list, Jan 2011.
Programs
-
PARI
my(p=2, L=1, l=1, g=1, o); while(p=nextprime(1+(o=p)), bittest(g,(p-o)\2) & next; my(a=(p-o)\2); g+=1<L & L=a; l==a || next; while(bittest(g,l++),); l>L & print1( L, ", "))
Comments