The numbers $1,2, \ldots, n$ are written in a board, with $n \in \mathbb{N}$. In every move, we can choose two numbers of the board, find their $\rm lcm$, and replace the two numbers with it. After $k$ moves, we find the sum of the numbers in the board, and we name it $S$. Find the minimum and the maximum value of $n$, such that there is $k$ such that $S=2017$.
This is an exercise I show at a Mathematical Forum, posted on 2017, and I have been trying this for a long time actually, and the things I have proven aren't something important, so I would prefer full answers.
As far as I now, it isn't from an exam or a Math Olympiad.
Some hints (all numbers are $\in \Bbb N$).
Implications for the puzzle, to achieve $S=2017$:
A couple of example solutions, just for checking:
For $n=63, $ the initial $S_0= 2016$. We can take $2,3$ as our first $\rm lcm$ pair, which are replaced with $6$ to give $S_1=2017$
For $n=64,$ initial $S_0 = 2080$ and for a target of $2017$ we need to lose $63$. We can feed the powers of $2$ into the $\rm lcm$ calculation to replace all of $\{1,2,4,8,16,32,64\}$ with $64,$ achieving the target sum at $k=6$. Or we could use $\rm lcm$ pairs $(32,64)$ and $(31,62)$ to achieve it at $k=2$.
The highest value of $n$ is likely determined by the case where none of the remaining values is a multiple of any other; that is, the last set where $\lfloor n/2 \rfloor {+}1$ to $n$ sums to less that $2017$. This happens for $\fbox{$n=72$}$, when taking $(k,2k)\to 2k$ for every $k$ up to $36$ except for $k=19$ will give the required sum.
The lowest value of $n$ is at least $9$, since below that ${\rm lcm}(1..n)$ is too far below $2017$ - in particular ${\rm lcm}(1..8) = 840$. It's relatively easy to solve this, for example, for $n=24$ by assembling ${\rm lcm}$s from the original numbers in sequential pairs $\{(1,2),(3,4),(5,6),\ldots\}$ for a total of $2444$ and then disassembling some pairs and creating others appropriately to get the target value: $\{1, (2,5),$ $(3,4), 6,$ $(7,8),$ $9, 10,$ $(11,12),$ $(13,14),$ $(15,16),$ $(17,18),$ $19, 20,$ $(21,22),$ $(23,24)\}$. There will be solutions for smaller values of $n$ which use more than two numbers in ${\rm lcm}$ calculations - my smallest is $\fbox{$n=12$}$ which is achieved with $(9,10,11,12)\to 1980,$ $(1,4,6)\to 12,$ and $\{2,3,5,7,8\}$ adding in unchanged.