login
A308044
a(n) = 2*prevprime(2*n-1) - 2*n, where prevprime(n) is the largest prime < n.
0
0, 0, 2, 4, 2, 8, 10, 8, 14, 16, 14, 20, 18, 16, 26, 28, 26, 24, 34, 32, 38, 40, 38, 44, 42, 40, 50, 48, 46, 56, 58, 56, 54, 64, 62, 68, 70, 68, 66, 76, 74, 80, 78, 76, 86, 84, 82, 80, 94, 92, 98, 100, 98, 104, 106, 104, 110, 108, 106, 104, 102, 100, 98, 124
OFFSET
2,3
COMMENTS
a(n) is the difference between the parts in the single partition of 2*n into two parts such that the larger part is the biggest prime < 2*n - 1.
For n > 1, the sequence of terms agrees with A303603 up to a(48), but a(49) = 80, whereas A303603(49) = 60. (This is because the smallest prime less than 2*49 - 1 = 97 is 89, which is paired with 9. This is the first instance in which the largest prime < 2*n - 1 is not paired with a prime. Regardless of whether the smallest part is prime or composite, we take the difference. So a(49) = 89 - 9 = 80.)
FORMULA
a(n) = 2*A151799(2*n - 1) - 2*n.
MATHEMATICA
Table[2 NextPrime[2 n - 1, -1] - 2 n, {n, 2, 100}]
PROG
(PARI) a(n) = 2*precprime(2*n-2) - 2*n; \\ Michel Marcus, May 10 2019
CROSSREFS
Sequence in context: A065286 A068217 A303603 * A319252 A114593 A114655
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 10 2019
STATUS
approved