login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A335185 a(n) = nextprime(ceiling(n/2)-1) - prevprime(floor(n/2)+1), where nextprime = A151800 and prevprime = A151799. 1
0, 1, 0, 2, 2, 2, 0, 2, 2, 2, 0, 4, 4, 4, 4, 4, 4, 4, 0, 2, 2, 2, 0, 4, 4, 4, 4, 4, 4, 4, 0, 2, 2, 2, 0, 4, 4, 4, 4, 4, 4, 4, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 2, 2, 2, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 4, 4, 4, 4, 4, 4, 4, 0, 2, 2, 2, 0, 4, 4, 4, 4, 4, 4, 4, 0, 6, 6, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,4
COMMENTS
a(n) is the difference of the smallest prime appearing among the largest parts of the partitions of n into two parts and the largest prime appearing among the smallest parts of the partitions of n into two parts.
a(n) = 0 if and only if n = 2p, where p is prime. All terms are even except a(5).
The values in the n-th run of positive integers are all equal to the n-th prime gap (A001223).
Each value specifies the run length of the block (of positive integers) in which it appears. If a(n) = 0, then it appears once. If a(n) > 0, it has a run length of 2k - 1.
LINKS
FORMULA
a(n) = A151800(ceiling(n/2)-1) - A151799(floor(n/2)+1).
EXAMPLE
a(5) = 1; n=5 has 2 partitions into two parts: (4,1) and (3,2). Among the largest parts, the smallest prime is 3. Among the smallest parts, 2 is the largest. So a(5) = 3 - 2 = 1.
a(6) = 0; n=6 has 3 partitions into two parts: (5,1), (4,2) and (3,3). Among the largest parts, the smallest prime is 3. Among the smallest parts, the largest prime is 3. So a(6) = 3 - 3 = 0.
a(7) = 2; n=7 has 3 partitions into two parts: (6,1), (5,2) and (4,3). Among the largest parts, 5 is the smallest. Among the smallest parts, 3 is the largest. So a(7) = 5 - 3 = 2.
MATHEMATICA
Table[NextPrime[Ceiling[n/2] - 1, 1] - NextPrime[Floor[n/2] + 1, -1], {n, 4, 100}]
PROG
(Magma) [NextPrime(Ceiling(n/2)-1) - PreviousPrime(Floor(n/2)+1) : n in [4..100]];
CROSSREFS
Cf. A001223 (prime gaps), A151799, A151800, A335186.
Sequence in context: A277024 A317528 A246793 * A319243 A307521 A328995
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 25 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)