

A308022


a(n) = prevprime(2*n1)  nextprime(n1), where prevprime = A151799 and nextprime = A151800.


0



0, 0, 0, 2, 0, 4, 2, 2, 6, 8, 6, 10, 6, 6, 12, 14, 12, 12, 14, 14, 18, 20, 14, 18, 18, 18, 24, 24, 22, 28, 24, 24, 24, 30, 30, 34, 32, 32, 32, 38, 36, 40, 36, 36, 42, 42, 36, 36, 44, 44, 48, 50, 44, 48, 50, 50, 54, 54, 52, 52, 46, 46, 46, 60, 60, 64, 60, 60
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,4


COMMENTS

a(n) is the difference of the largest and smallest prime(s) in the closed interval [n, 2n2].
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 < 2n1.


LINKS

Table of n, a(n) for n=2..69.
Index entries for sequences related to partitions


FORMULA

a(n) = A151799(2*n1)  A151800(n1).


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

Cf. A151799, A151800.
Sequence in context: A271230 A112824 A195133 * A001100 A218831 A242595
Adjacent sequences: A308019 A308020 A308021 * A308023 A308024 A308025


KEYWORD

nonn,easy


AUTHOR

Wesley Ivan Hurt, May 09 2019


STATUS

approved



