### 3.7.24. Autoref

A constraint that allows for modelling the autoref problem with one single constraint. The autoref problem is a generalisation of the problem of finding a magic serie and can be defined in the following way. Given an integer $n>0$ and an integer $m\ge 0$, the problem is to find a non -empty finite series $S=\left({s}_{0},{s}_{1},...,{s}_{n},{s}_{n+1}\right)$ such that (1) there are ${s}_{i}$ occurrences of $i$ in $S$ for each integer $i$ ranging from 0 to $n$, and (2) ${s}_{n+1}=m$. This leads to the following model:

$\mathrm{𝚐𝚕𝚘𝚋𝚊𝚕}_\mathrm{𝚌𝚊𝚛𝚍𝚒𝚗𝚊𝚕𝚒𝚝𝚢}$$\left(\begin{array}{c}〈\begin{array}{c}\mathrm{𝚟𝚊𝚛}-{s}_{0},\mathrm{𝚟𝚊𝚛}-{s}_{1},...,\mathrm{𝚟𝚊𝚛}-{s}_{n},\mathrm{𝚟𝚊𝚛}-m\hfill \end{array}〉,\hfill \\ 〈\begin{array}{cc}\mathrm{𝚟𝚊𝚕}-0\hfill & \mathrm{𝚗𝚘𝚌𝚌𝚞𝚛𝚛𝚎𝚗𝚌𝚎}-{s}_{0},\hfill \\ \mathrm{𝚟𝚊𝚕}-1\hfill & \mathrm{𝚗𝚘𝚌𝚌𝚞𝚛𝚛𝚎𝚗𝚌𝚎}-{s}_{1},\hfill \\ & ⋮\hfill \\ \mathrm{𝚟𝚊𝚕}-n\hfill & \mathrm{𝚗𝚘𝚌𝚌𝚞𝚛𝚛𝚎𝚗𝚌𝚎}-{s}_{n}\hfill \end{array}〉\hfill \end{array}\right)$

23, 2, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5 and 23, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5 are the two unique solutions for $n=27$ and $m=5$.