A218014 Location of the n-th prime in its Andrica ranking.
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
Keywords
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.
Links
- Marek Wolf, A Note on the Andrica Conjecture, arXiv:1010.3945 [math.NT], 2010.
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
Comments