Considere los conjuntos de números enteros $$ Un = \{1, 3, 7, 13, 27\} \\ B = \{4, 10, 16, 40, 100\} $$
Elementwise addition of sets $A, B$ looks like $a + B := \{ a + b: \en a, b \in B\}$.
Now elementwise-add them to form $a + B$. Aquí está el resultado: $$ \begin{matrix} + & 1 & 3 & 7 & 13 & 27 & \\ 4 & 5 & 7 & 11 & 17 & 31 & \\ 10 & 11 & 13 & 17 & 23 & 37 \\ 16 & 17 & 19 & 23 & 29 & 43 \\ 40 & 41 & 43 & 47 & 53 & 67 \\ 100 & 101 & 103 & 107 & 113 & 127\\ \end{de la matriz} $$
As you can see, this doesn't perfectly list the first $n$ primes since $59$ is missing.
Can you come up with two sets of integers $a, B$ such that $ + B$ consists only of prime numbers and such that $a|a + B| \gt 20$. In other words, can you beat me in my example above?
Thus, if we don't examine the size of the integers involved in the above matrix, we've effectly compressed $n^2 - n$ primes into $2n$ numbers where $n = 5$. Yo no sé ustedes, pero a mí eso parece bastante interesante!
Continuando desde arriba (lápiz y papel): $$ \begin{matrix} + & 1 & 3 & 7 & 13 & 27 & 57 &\\ 4 & 5 & 7 & 11 & 17 & 31 & 61\\ 10 & 11 & 13 & 17 & 23 & 37 & 67\\ 16 & 17 & 19 & 23 & 29 & 43 & 73\\ 40 & 41 & 43 & 47 & 53 & 67 & 97\\ 100 & 101 & 103 & 107 & 113 & 127 & 157\\ \end{de la matriz} $$
Here's a script you can play with:
from sympy.ntheory import prime, isprime
# Seed with whatever you want:
A = [1, 3, 7]
B = [4, 10, 16]
M = 1000
for k in range(0, M):
if k % 2 == 0:
b = max(B) + 1
for n in range(b, b + M):
for a in A:
if not isprime(a + n):
break
else:
B.append(n)
break
else:
a = max(A) + 1
for n in range(a, a + M):
for b in B:
if not isprime(b + n):
break
else:
A.append(n)
break
def elementwise_add(A, B):
C = set()
for a in A:
for b in B:
C.add(a + b)
return list(C)
print(A)
print(B)
C = elementwise_add(A, B)
C.sort()
print(C)
Outputs:
[1, 3, 7, 13, 27, 63, 97]
[4, 10, 16, 40, 100, 346, 1090, 1426]
[5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 67, 73, 79, 101, 103, 107, 113, 127, 137, 163, 197, 347, 349, 353, 359, 373, 409, 443, 1091, 1093, 1097, 1103, 1117, 1153, 1187, 1427, 1429, 1433, 1439, 1453, 1489, 1523]
Did some thought on the problem:
Ease the constraints some, and allow $0, \pm 1$ into the result set of $ + B$.
Take a finite subsquare of the composition group law for $(\Bbb{Z}, +)$. For example:
$$ \begin{matrix} -2 & (-1) & 0 & 1 & 2 & (3) & 4 & (5) \\ -1 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & \\ 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\ 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10\\ 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \\ 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 \\ 6 & (7) & 8 & 9 & 10 & (11) & 12 & (13) \\ \vdots \\ 12 & (13) & 14 & 15 & 16 & (17) & 18 & (19) \\ \end{de la matriz} $$
First, assume that $7$ is in $Un$ and highlight the prime columns with parentheses like above. Those are the only columns that you can select from to fill out $B$. Since we don't want to delete anything from $$, resalte todas las filas tal que las filas primer columnas contienen fila "7"s primer columnas. Esto se hace en la tabla de arriba.