login
A308048
a(n) = n - nextprime(ceiling(n/2) - 1), where nextprime(n) is the smallest prime > n.
0
-1, 0, 1, 2, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 4, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12, 13, 10, 11, 12, 13, 14, 15, 16, 17, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 26, 27, 28, 29, 30, 31, 32
OFFSET
1,4
COMMENTS
For n >= 3, a(n) is the difference of n and the smallest prime appearing among the larger parts of the partitions of n into two parts.
FORMULA
a(n) = n - A151800(ceiling(n/2) - 1).
EXAMPLE
a(7) = 2; n = 7 has three partitions into two parts: (6,1), (5,2) and (4,3). The smallest prime among the larger parts is 5 and 7 - 5 = 2.
MATHEMATICA
Table[n - NextPrime[Ceiling[n/2] - 1, 1], {n, 100}]
CROSSREFS
Cf. A151800.
Sequence in context: A059711 A318287 A048621 * A335967 A319611 A337102
KEYWORD
sign,easy
AUTHOR
Wesley Ivan Hurt, May 10 2019
STATUS
approved