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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A332787 Negative-pan primes (see Comments). 2
2, 3, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 241, 251, 257, 263, 277, 281, 283, 293, 307, 311, 317, 331, 337, 347, 349, 353, 359, 367 (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.

The negative pan N can be fractalized, i.e., subdivided into NN and NP pans, where NN ={{2,3,7,11},{13,17,19,29,37,41,43},...} and NP = {{23},{199},...}. Can this fractalization be continued infinitely?

LINKS

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

EXAMPLE

First division: 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).

Second division: 2,3,7 and 11 unbalance the N pan (and go to the NN subpan), but 23 balances it (and goes to NP subpan).

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]},

If[ totalN==totalP,

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

NextPrime[tab[[-2]], -1]],

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]

]]]; Abs[Select[a/@Range[78], Negative]]

CROSSREFS

Cf. A249031, A332341, A332788.

Sequence in context: A173555 A086339 A333364 * A181173 A216277 A089174

Adjacent sequences:  A332784 A332785 A332786 * A332788 A332789 A332790

KEYWORD

easy,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 September 29 18:03 EDT 2020. Contains 337432 sequences. (Running on oeis4.)