cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A335186 a(n) = nextprime(ceiling(n/2)-1) + prevprime(floor(n/2)+1), where nextprime = A151800 and prevprime = A151799.

This page as a plain text file.
%I A335186 #6 Sep 08 2022 08:46:25
%S A335186 4,5,6,8,8,8,10,12,12,12,14,18,18,18,18,18,18,18,22,24,24,24,26,30,30,
%T A335186 30,30,30,30,30,34,36,36,36,38,42,42,42,42,42,42,42,46,52,52,52,52,52,
%U A335186 52,52,52,52,52,52,58,60,60,60,62,68,68,68,68,68,68,68,68,68,68,68,74
%N A335186 a(n) = nextprime(ceiling(n/2)-1) + prevprime(floor(n/2)+1), where nextprime = A151800 and prevprime = A151799.
%C A335186 a(n) is the sum 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.
%C A335186 If n = 2p where p is prime, then a(n) = n. The converse is not true since a(8) = 8, but n = 2*4 and 4 is not prime.
%C A335186 All terms are even except a(5).
%H A335186 <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F A335186 a(n) = A151800(ceiling(n/2)-1) + A151799(floor(n/2)+1).
%e A335186 a(5) = 5; 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 = 5.
%e A335186 a(6) = 6; 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 = 6.
%e A335186 a(7) = 8; 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 = 8.
%t A335186 Table[NextPrime[Ceiling[n/2] - 1, 1] + NextPrime[Floor[n/2] + 1, -1], {n, 4, 100}]
%o A335186 (Magma) [NextPrime(Ceiling(n/2)-1) + PreviousPrime(Floor(n/2)+1) : n in [4..100]];
%Y A335186 Cf. A001223 (prime gaps), A151799, A151800, A335185.
%K A335186 nonn,easy
%O A335186 4,1
%A A335186 _Wesley Ivan Hurt_, May 25 2020