cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A229832 First term of smallest sequence of n consecutive weak primes.

Original entry on oeis.org

3, 19, 349, 2909, 15377, 128983, 1319411, 17797519, 94097539, 6927837559, 48486712787, 968068681519, 1472840004019, 129001208165719
Offset: 1

Views

Author

Jonathan Sondow, Oct 13 2013

Keywords

Comments

Erdős called a weak prime A051635 an "early prime," defined to be one which is less than the arithmetic mean of the prime before it and the prime after it. He conjectured that there are infinitely many consecutive pairs of early primes, and offered $100 for a proof and $25000 for a disproof. See Kuperberg 1992.
I make the stronger conjecture that the sequence a(n) is infinite.
a(1) = A051635(1), a(2) = A054820(1), a(3) = A054824(1), a(4) = A054829(1), a(5) = A054835(1).
a(n) is the prime following A158939(n+1). [Follows from the definitions] - Chris Boyd, Mar 28 2015

Examples

			The primes 19 < (17+23)/2 and 23 < (19+29)/2 are the smallest pair of consecutive weak/early primes, so a(2) = 19.
		

Crossrefs

Formula

a(n) = min{p(i): 2*p(i+j) < p(i+j-1) + p(i+j+1), j = 0,1,..,n-1}.

Extensions

a(6) corrected by and a(7)-a(13) from Giovanni Resta, Jan 16 2014
a(14) from Giovanni Resta, Apr 19 2016

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

Views

Author

Amarnath Murthy, Mar 10 2002

Keywords

Comments

This is the same as asking for the smallest prime in the first occurrence of a nonnegative second difference for a set of n successive primes.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    (* 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 ]]
  • PARI
    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

Extensions

More terms from Robert G. Wilson v, May 10 2002 and Dec 08 2002, who finds that a(12) > 2.7*10^9
a(12) = 6564959561 from Zak Seidov and other edits by M. F. Hasler, May 16 2017
a(13)-a(15) from Giovanni Resta, May 18 2017

A158940 First primes followed by sequences of exactly n monotonic decreasing prime gaps.

Original entry on oeis.org

2, 7, 31, 1637, 1831, 74653, 322171, 5051309, 11938793, 245333213, 245333159, 130272314561, 1273135176799, 23840790158827
Offset: 1

Views

Author

Alan Worley (aw(AT)xiboo.co.uk), Mar 31 2009

Keywords

Comments

a(15) > 1.3*10^14. - Giovanni Resta, Apr 19 2016
Banks, Freiberg, & Turnage-Butterbaugh show that a(n) exists for each n. - Charles R Greathouse IV, Jun 30 2022

Examples

			a(4)=1637 is the first prime to be followed by n=4 monotonic decreasing prime gaps: 20,6,4,2.
a(13)=1273135176799 is the first prime to be followed by n=13 monotonic decreasing prime gaps: 72,60,46,44,42,36,34,24,12,8,6,4,2.
		

Crossrefs

Cf. A158939 (monotonic increasing prime gaps)

Extensions

a(14) from Giovanni Resta, Apr 19 2016

A033625 Primes and gaps for the first 10 increasing consecutive gaps.

Original entry on oeis.org

94097537, 2, 94097539, 4, 94097543, 8, 94097551, 10, 94097561, 12, 94097573, 14, 94097587, 16, 94097603, 18, 94097621, 30, 94097651, 32, 94097683
Offset: 0

Views

Author

Keywords

Crossrefs

94097537 = A158939(10).

A133697 a(n) = smallest number k such that P(k)/P(k+1) > P(k+1)/P(k+2) > ... > P(k+n+1)/P(k+n+2), where P(k) = k-th prime = A000040(k).

Original entry on oeis.org

1, 7, 69, 420, 1796, 12073, 101397, 1139211, 5440508, 320620306, 2058187481, 36451609409, 54594153615, 4100904808215
Offset: 0

Views

Author

Philippe LALLOUET (philip.lallouet(AT)orange.fr), Jan 04 2008

Keywords

Comments

In other words, the rank of the smallest prime number such that the ratio between each prime and the following one is decreasing for at least n+2 consecutive ratios.
The sequence of primes P[a(n)] begins 2,17,347,2903,15373,128981,... - Robert G. Wilson v, Mar 01 2008
a(9) > 120000000. - Robert G. Wilson v, Mar 01 2008
If 113 is, as conjectured, the last term of A124129, then P(a(n)) = A158939(n+2). Proof: Let x and y be the prime gaps following the prime p = P(j) > 113, so that P(j+1) = P(j) + x and P(j+2) = P(j) + x + y. The inequality P(j)/P(j+1) > P(j+1)/P(j+2) can be written as p/(p+x) > (p+x)/(p+x+y), which simplifies to y > x+x^2/p. By assumption, x^2 < p, so this holds if and only if y > x. So the condition P(j)/P(j+1) > P(j+1)/P(j+2) is equivalent to increasing prime gaps, P(j+2) - P(j+1) > P(j+1) - P(j). (In fact, since all prime gaps except the first are even, it is enough to assume the weaker conjecture that 7 is the only prime P(j) such that (P(j+1)-P(j))^2 >= 2*P(j).) - Pontus von Brömssen, Nov 19 2021

Examples

			P(1)=2, P(2)=3, P(3)=5; 2/3 > 3/5, hence a(0)=1.
17/19 > 19/23 > 23/29 is the first double inequality satisfied by consecutive primes, hence a(1)=7 as 17=P(7).
347/349 > 349/353 > 353/359 > 359/367 is the first triple inequality satisfied by consecutive primes, hence a(2)=69 as 347=P(69).
		

Crossrefs

Programs

  • Mathematica
    (* for the 6th term *) n = 12000; While[ Prime[n]/Prime[n + 1] < Prime[n + 1]/Prime[n + 2] || Prime[n + 1]/Prime[n + 2] < Prime[n + 2]/Prime[n + 3] || Prime[n + 2]/Prime[n + 3] < Prime[n + 3]/Prime[n + 4] || Prime[n + 3]/Prime[n + 4] < Prime[n + 4]/Prime[n + 5] || Prime[n + 4]/Prime[n + 5] < Prime[n + 5]/Prime[n + 6] || Prime[n + 5]/Prime[n + 6] < Prime[n + 6]/Prime[n + 7] || Prime[n + 6]/Prime[n + 7] < Prime[n + 7]/Prime[n + 8], n++ ]; Print[n] (* Robert G. Wilson v, Mar 01 2008 *)

Extensions

a(6)-a(8) from Robert G. Wilson v, Mar 01 2008
a(9)-a(13) (based on data for A158939) from Pontus von Brömssen, Nov 19 2021
Edited to make name and offset consistent by Pontus von Brömssen, Nov 19 2021

A348927 a(n) is the smallest prime followed by n prime gaps in arithmetic progression with a common difference of 2.

Original entry on oeis.org

2, 5, 17, 347, 2903, 15373, 128981, 95285633, 2426256797, 41193770837, 706748065831, 68439250465123, 68439250465123
Offset: 1

Views

Author

Marc Morgenegg, Nov 04 2021

Keywords

Comments

a(n) is the smallest prime p for which the n+1 consecutive primes starting at p can be written as p + c*k + k^2, 0 <= k <= n, for some c >= 0. - Pontus von Brömssen, Nov 07 2021
73389327921983 is the smallest prime followed by exactly 12 such gaps. - Martin Ehrenstein, Nov 20 2021

Examples

			a(2)=5, the 2 prime gaps after 5 are 2,4.
a(3)=17, the 3 prime gaps after 17 are 2,4,6.
a(4)=347, the 4 prime gaps after 347 are 2,4,6,8.
a(5)=2903, the 5 prime gaps after 2903 are 6,8,10,12,14.
		

Crossrefs

Cf. A349121 (same, but starting prime gap = 2), A001223 (prime gaps), A036263 (2nd differences), A158939 (monotonic increasing), A006560 (consecutive primes in arithmetic progression).
First column of A094749 (except first few terms).

Programs

  • Mathematica
    Join[{p=2},Table[While[Union@Differences[NextPrime[p,Range[0,n]],2]!={2},p=NextPrime@p];p,{n,2,7}]] (* Giorgos Kalogeropoulos, Nov 05 2021 *)

Extensions

a(8) from Giorgos Kalogeropoulos, Nov 05 2021
a(9) from Pontus von Brömssen, Nov 07 2021
a(10)-a(13) from Martin Ehrenstein, Nov 20 2021

A349121 a(n) is the smallest prime p, such that p + k + k^2 are consecutive primes for 0 <= k <= n, but not for k>n.

Original entry on oeis.org

3, 5, 17, 347, 13901, 665111, 128981, 113575727, 2426256797, 137168442221, 4656625081181, 101951758179851, 484511389338941, 221860944705726407
Offset: 1

Views

Author

Marc Morgenegg, Nov 08 2021

Keywords

Comments

a(n) is the smallest prime followed by exactly n prime gaps in arithmetic progression with a common difference of 2 and starting with prime gap 2.

Examples

			a(4)=347, because it is the smallest prime such that 347 + 2 = 349, 349 + 4 = 353, 353 + 6 = 359, 359 + 8 = 367 are 5 consecutive primes.
		

Crossrefs

Cf. A016045, A001223 (prime gaps), A036263 (2nd differences), A158939 (monotonic increasing).

Programs

  • Mathematica
    Table[k=2;While[Flatten[k+(s={Range[0,n]})+s^2]!=NextPrime[k,Range[0,n]]||NextPrime[k,n+1]==k+n+1+(n+1)^2,k=NextPrime@k];k,{n,7}] (* Giorgos Kalogeropoulos, Nov 10 2021 *)
  • PARI
    isok(p, n) = my(q=p); for (k=1, n, my(r = p+k+k^2); if (nextprime(q+1) != r, return (0)); q=r); return(1);
    a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p; \\ Michel Marcus, Nov 09 2021
Showing 1-7 of 7 results.