login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A332788 Positive-pan primes (see Comments). 2
5, 31, 59, 107, 271, 223, 269, 313, 647, 457, 503, 941, 1579, 12919, 3571, 1667, 2897, 3037, 3187, 1993, 3461, 2179, 10141, 5927, 11969, 4957, 13627, 5519, 22787, 3851, 3889, 3929, 15217, 44221, 65867, 21799, 10211, 31727, 24623, 11467 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Take a double-pan balance scale and name the pans "negative" and "positive". At each step, the question is: "Is there an unused prime that would balance the scale if added to the positive pan? If the answer is yes, add that prime to the positive pan. Otherwise, add the smallest unused prime to the negative pan.

Is the number of primes in the positive pan (P) infinite? If it is, is fractalization of P, i.e., further subdivision into PN and PP subpans, possible (including infinitely)?

LINKS

Table of n, a(n) for n=1..40.

EXAMPLE

2 and 3 unbalance the scale (and go to the negative pan N), but 5 = 2 + 3 balances it (and goes to the positive pan P).

MATHEMATICA

a[1]=-2; a[n_]:=a[n]=Module[{tab=Table[a[i], {i, 1, n-1}],

    totalN=Abs[Total[Select[Table[a[i], {i, 1, n-1}], Negative]]],

     totalP=Total[Select[Table[a[i], {i, 1, n-1}], Positive]],

    l=NextPrime[Last[Select[Table[a[i], {i, 1, n-1}], Negative]], -1],

    m=NextPrime[Abs[Last[Select[Table[a[i], {i, 1, n-1}], Negative]]]]},

   If[totalN==totalP,

    If[PrimePi[tab[[-1]]]-PrimePi[Abs[tab[[-2]]]]==1, -NextPrime[tab[[-1]]],

     If[FreeQ[Abs[tab], m], -m, While[! FreeQ[Abs[tab], m], m=NextPrime[m]]; -m]],

    If[PrimeQ[totalN-totalP]&&FreeQ[Abs[tab], totalN-totalP], totalN-totalP,

     If[FreeQ[Abs[tab], Abs[l]], l, While[!FreeQ[Abs[tab], Abs[l]], l=NextPrime[l, -1]]; l]

]]]; Select[a/@Range[370], Positive]

CROSSREFS

Cf. A075326, A332341, A332787.

Sequence in context: A245523 A147033 A125743 * A333243 A078686 A031908

Adjacent sequences:  A332785 A332786 A332787 * A332789 A332790 A332791

KEYWORD

nonn

AUTHOR

Ivan N. Ianakiev, Feb 24 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 16:46 EST 2020. Contains 338877 sequences. (Running on oeis4.)