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.

A351124 a(n) is the least k > 0 such that the set { prime(n), ..., prime(n+k-1) } can be partitioned into two disjoint sets with equal sum, or -1 if no such k exists (prime(n) denotes the n-th prime number).

This page as a plain text file.
%I A351124 #7 Feb 11 2022 09:33:00
%S A351124 3,6,4,4,4,4,8,10,4,8,8,4,10,14,6,4,6,6,8,8,4,8,12,10,4,4,4,8,4,8,6,
%T A351124 10,4,6,8,18,4,6,8,6,4,12,4,8,10,6,10,4,8,6,8,12,10,4,6,4,8,8,10,8,12,
%U A351124 8,4,12,6,6,8,8,14,8,4,8,10,4,10,6,4,10,8,4,4
%N A351124 a(n) is the least k > 0 such that the set { prime(n), ..., prime(n+k-1) } can be partitioned into two disjoint sets with equal sum, or -1 if no such k exists (prime(n) denotes the n-th prime number).
%C A351124 Conjecture: all terms are positive.
%H A351124 Alois P. Heinz, <a href="/A351124/b351124.txt">Table of n, a(n) for n = 1..20000</a>
%F A351124 a(n) = 4 iff n belongs to A022884.
%e A351124 The first terms, alongside an appropriate partition {P, Q}, are:
%e A351124   n   a(n)  P                     Q
%e A351124   --  ----  --------------------  --------------------
%e A351124    1     3  {2, 3}                {5}
%e A351124    2     6  {3, 5, 7, 13}         {11, 17}
%e A351124    3     4  {5, 13}               {7, 11}
%e A351124    4     4  {7, 17}               {11, 13}
%e A351124    5     4  {11, 19}              {13, 17}
%e A351124    6     4  {13, 23}              {17, 19}
%e A351124    7     8  {17, 29, 31, 43}      {19, 23, 37, 41}
%e A351124    8    10  {19, 31, 41, 47, 53}  {23, 29, 37, 43, 59}
%e A351124    9     4  {23, 37}              {29, 31}
%e A351124   10     8  {29, 41, 47, 53}      {31, 37, 43, 59}
%o A351124 (PARI) a(n) = { my (s=[0], k=0); forprime (p=prime(n), oo, s=setunion(apply (v -> v-p, s), apply (v -> v+p, s)); k++; if (setsearch(s, 0), return (k))) }
%Y A351124 Cf. A022884.
%K A351124 nonn
%O A351124 1,1
%A A351124 _Rémy Sigrist_, Feb 02 2022