OFFSET
2,4
COMMENTS
a(n) is the difference of the largest and smallest prime(s) in the closed interval [n, 2n-2].
Also, the maximum distance between all pairs of primes (not necessarily distinct) appearing among the largest parts of the partitions of 2n into two parts < 2n-1.
EXAMPLE
a(10) = 6; The primes in the closed interval [10, 18] are 11, 13 and 17. The difference of the largest and smallest primes is 17 - 11 = 6.
MATHEMATICA
Table[NextPrime[2 n - 1, -1] - NextPrime[n - 1, 1], {n, 2, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 09 2019
STATUS
approved