{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}”No results found for “{{searchWords}}”× back to contents
Write the number as $\overline{abcd}$ with $a+d=b+c$. First allow $a=0$ as well, and count strings of four digits.
The number of pairs of digits with sum $s$ is $s+1$ for $0\le s\le9$ and $19-s$ for $10\le s\le18$. Choosing the pair $(a,d)$ and the pair $(b,c)$ with the same sum $s$ gives \[1^2+2^2+\dots+10^2+9^2+\dots+1^2=385+285=670\] strings.
Now remove the strings with $a=0$. Then $d=b+c$, so $(b,c)$ is any pair of digits with $b+c\le9$, and $d$ is determined. There are $1+2+\dots+10=55$ such pairs.