2

I need to solve the following problem.

Let $A=\{a_0,a_1,a_2,\cdots,a_k\}$

Find $a_i$ such that:

$|A|\geq 3$

$a_i\in \mathbb{N}$ and $a_i\in [32,127]$

$p=\sum_i a_i$ is prime

and $\sum_i a_i = \prod_i a_i \mod n$ for some $n\in\mathbb{N}$

I tried using the mixed integer linear programming solver in sage (Docs), but that clearly failed since the system is not linear.

I cannot seem to find any literature on this, does anyone know of any efficient solutions for problems like this? I wondered if this can be interpreted as a lattice problem like CVP(Closest vector problem) and solved that way, but I'm not sure where to start with this approach.

  • You can solve this by hand. Take $i=1$ and $a_1=37$. Then $\sum_ia_i=\prod_i a_i=37$ for all $n\in \Bbb N$. In case, you want to solve this for several numbers $a_i$, consider first the equality, see here. – Dietrich Burde Jan 04 '23 at 13:06
  • I forgot to add that the set of $a_i$'s need to have at least 3 elements. – limeeattack Jan 04 '23 at 13:10
  • I do not understand "$\sum_i a_i = \prod_i a_i \mod n$ for $n\in\mathbb{N}$". For which $n$? If it is for every $n,$ it is equivalent to equality. If it is for some $n,$ it is always true (with $n=1$). – Anne Bauval Jan 04 '23 at 13:19
  • I'm looking for solution strategies for arbitrary fixed $n$, but to me it would be most useful for n of the form $2^i$ with $i>1$. – limeeattack Jan 04 '23 at 13:32
  • For an ellipsis on the baseline, use \ldots instead of \cdots (which is for a vertically centred ellipsis). – joriki Jan 08 '23 at 16:25

0 Answers0