A162203 The mountain path of the primes (see comment lines for definition).
2, 2, 2, 3, 1, -1, 1, 3, 1, -1, 1, 3, 1, -3, 1, 4, 1, -2, 1, 5, 1, -1, 1, 3, 1, -3, 1, 6, 1, -2, 1, 4, 1, -3, 1, 3, 1, -2, 1, 5, 1, -3, 1, 7, 1, -4, 1, 3, 1, -1, 1, 3, 1, -1, 1, 9, 1, -7, 1, 5, 1, -2, 1, 6, 1, -4, 1, 4, 1, -4, 1, 5, 1, -3, 1, 6, 1, -2, 1, 6
Offset: 1
Examples
Array begins: ===== X..Y ===== 2, 2; 2, 3; 1,-1; 1, 3; 1,-1; 1, 3; 1,-3; 1, 4; 1,-2; 1, 5;
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
- Omar E. Pol, Graph of the mountain path function for prime numbers
- Omar E. Pol, Illustration: The mountain path of the primes
Crossrefs
Programs
-
PARI
\\ (After Nathaniel Johnston_'s formula): A052288(n) = ((prime(n+3) - prime(n+1))/2); A162203(n) = if(n<=3, 2, if(n%2, 1, 1+((-1)^(n/2)*(A052288(n/2)-1)))); \\ Antti Karttunen, Mar 02 2023
Formula
From Nathaniel Johnston, May 10 2011: (Start)
a(2n+1) = 1 for n >= 2.
Extensions
Edited by Omar E. Pol, Jul 02 2009
More terms from Nathaniel Johnston, May 10 2011
Comments