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-2 of 2 results.

A218015 Number of primes p such that sqrt(q) - sqrt(p) > 1/n, where q is the prime after p.

Original entry on oeis.org

0, 6, 22, 41, 75, 132, 186, 258, 330, 416, 511, 613, 724, 860, 1001, 1163, 1372, 1563, 1751, 1965, 2179, 2412, 2685, 2945, 3258, 3581, 3885, 4194, 4525, 4857, 5246, 5644, 6024, 6402, 6767, 7229, 7695, 8177, 8666, 9156, 9674, 10185, 10740, 11283, 11824
Offset: 1

Views

Author

Marek Wolf and Robert G. Wilson v, Oct 18 2012

Keywords

Comments

Also, the number of terms by Andrica ranking which are greater than 1/n.

Examples

			a(1) = 6 because only the primes 3, 7, 13, 23, 31 and 113 satisfy the criterion.
As an example, - sqrt(3) + sqrt(5) ~= 0.50401717 which is greater than 1/2.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; p = 2; q = 3; While[p < 10^8, If[ Sqrt[q] - Sqrt[p] > 1/50, AppendTo[lst, {p, Sqrt[q] - Sqrt[p]}]]; p = q; q = NextPrime[q]]; Table[ Length@ Select[ lst, #[[2]] > 1/n &], {n, 50}]
    nn = 50; t = Table[0, {nn}]; p = 2; q = 3; While[p < 10^8, n = Floor[1/(Sqrt[q] - Sqrt[p])]; If[n <= nn, t[[n]]++]; p = q; q = NextPrime[q]]; Join[{0}, Accumulate[t]] (* T. D. Noe, Oct 18 2012 *)

A218014 Location of the n-th prime in its Andrica ranking.

Original entry on oeis.org

27, 6, 13, 1, 31, 4, 54, 8, 3, 100, 5, 25, 155, 28, 9, 16, 243, 19, 49, 288, 21, 62, 24, 12, 75, 422, 81, 444, 84, 2, 112, 37, 580, 11, 634, 47, 53, 150, 57, 60, 788, 20, 840, 183, 872, 10, 14, 218, 1029, 228, 80, 1074, 26, 87, 92, 99, 1237, 103, 281, 1319, 29, 15, 314, 1498, 323
Offset: 1

Views

Author

Marek Wolf and Robert G. Wilson v, Oct 18 2012

Keywords

Comments

For each consecutive prime pair p < q, d = sqrt(q) - sqrt(p) is unique. Place d in order from greatest to least and specify p.
Last appearance by prime index: 1, 5, 7, 10, 13, 17, 20, 26, 28, 33, 35, 41, 43, 45, 49, ..., .
Last appearance of a minimum prime by Andrica ranking: 2, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, ..., .
As expected, this sequence is the lesser of the twin primes beginning with the second term, 11. See A001359.

Examples

			a(1)=27 since the first prime, 2, does not show up in the ranking until the 27th term. See A218013.
a(4)=1 since the fourth prime, 7, has the maximum A_n value, see A218012; i.e., sqrt(p_n)-sqrt(p_n+1) is at a maximum.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; p = 2; q = 3; While[p < 1600000, If[ Sqrt[q] - Sqrt[p] > 1/20, AppendTo[lst, {p, Sqrt[q] - Sqrt[p]}]]; p = q; q = NextPrime[q]]; lsu = First@ Transpose@ Sort[lst, #1[[2]] > #2[[2]] &]; Table[ Position[lsu, p, 1, 1], {p, Prime@ Range@ 65}] // Flatten
Showing 1-2 of 2 results.