A158939
First primes followed by sequences of exactly n monotonic increasing prime gaps.
Original entry on oeis.org
3, 2, 17, 347, 2903, 15373, 128981, 1319407, 17797517, 94097537, 6927837557, 48486712783, 968068681511, 1472840004017, 129001208165717
Offset: 1
Alan Worley (aw(AT)xiboo.co.uk), Mar 31 2009
a(8)=1319407 is the first prime to be followed by n=8 monotonic increasing prime gaps: 4,8,10,14,16,18,32,34.
a(14)=1472840004017 is the first prime to be followed by n=14 monotonic increasing prime gaps: 2,4,6,8,10,12,14,28,30,38,48,64,66,74.
-
is(p,k,g=0)=my(q=nextprime(p+1));if(g>=q-p,0,if(k>1,is(q,k-1,q-p),q-p>=nextprime(q+1)-q))
a(n)=forprime(p=2,,if(is(p,n),return(p))) \\ Charles R Greathouse IV, Nov 02 2012
A068843
Smallest prime in the first occurrence of a nondecreasing difference for a set of exactly n successive primes.
Original entry on oeis.org
37, 11, 17, 2, 1091, 2897, 13451, 448363, 7407287, 34400141, 255030533, 6564959561, 45605475961, 121054164221, 2552790756469
Offset: 1
The prime 2 starts the first run of exactly 4 nondecreasing gaps (1, 2, 2, 4) between the 5 primes (2, 3, 5, 7, 11). (The next gap would be of 2, smaller than 4.) Therefore a(4) = 2.
The prime 11 starts the first run of exactly 2 nondecreasing gaps (2, 4) between the 3 primes (11, 13, 17). (The preceding gap is 4 > 2 and the next gap would be 2 < 4.) Therefore a(2) = 11. The sequences of primes (2, 3, 5) as well as (5, 7, 11) are part of a longer run of nondecreasing gaps and are therefore not considered for the case n = 2.
The prime 17 starts the first run of exactly 3 nondecreasing gaps (2, 4, 4) between the 4 primes (17, 19, 23, 29). (The preceding gap is 4 > 2 and the next gap would be 2 < 4.) Therefore a(3) = 17. Again, primes which are part of a longer run cannot be considered.
The prime 37 starts the first run of exactly 1 nondecreasing gap (4) between the primes 37 and 41. (The preceding gap is 6 > 4 and the next gap would be 2 < 4.) Therefore a(1) = 37.
-
(* used to find a(11) *) k = 0; While[p = Select[ Range[ k*10^6, (k + 1)*10^6 + 10^4], PrimeQ[ # ] & ]; l = Length[p]; d1 = Take[p, 1 - l] - Take[p, l - 1]; d2 = Take[d1, 2 - l] - Take[d1, l - 2]; s = Sign[ Sign[d2] + 1]; q = StringPosition[ ToString[s], StringDrop[ StringDrop[ ToString[ Table[1, {10}]], 1], -1]]; q == {}, k++ ]; p[[ (q[[1, 1]] + 1)/3 ]]
-
A068843(n,c=n+1,g,o=2,P=2)={forprime(p=3,,c--;g>(g=-o+o=p)||next; c||break; c=n; P=p-g);P} \\ M. F. Hasler, May 16 2017
More terms from
Robert G. Wilson v, May 10 2002 and Dec 08 2002, who finds that a(12) > 2.7*10^9
Showing 1-2 of 2 results.
Comments