Proving that 31123319 is the largest number with a self-accounting property (A047841)

237 Views Asked by At

22 is special because it contains the number of its numbers. The next smallest number with this self-accounting property (see A047841) is 10213223. What is the largest such number?

I've figured out the numbers work in pairs, so the number must have an even number of digits, be at least 8 digits and that within each pair, 0 can never be first. Ex. 1002 has a 2, so there can't be 0 2's in the number. Beyond these parameters, I'm not sure how else to approach this problem. I'm was thinking that maybe something could be done with permutations and combinations, since the numbers work as pairs and there are some conditions, but I'm not sure how I would actually do this.

All help is appreciated!

1

There are 1 best solutions below

0
On BEST ANSWER

A method of attack - illustrated for 8 digit numbers, where no particular digit occurs more than $9$ times. Initially I will assume that the order of the pairs is irrelevant.

Let the number be $aAbBcCdD$. Then $a+b+c+d=8$ with each of $a,b,c,d$ being non-zero.

For the 8 digit number to have initial digit at least $3$, the possibilities for $\{a,b,c,d\}$ are $\{5,1,1,1\}$, $\{4,2,1,1\}$,$\{3,3,1,1\}$ or $\{3,2,2,1\}$.

Now apply the self-accounting property to each possibility:-

$\{5,1,1,1\}=\{A,A,A,A\}$ Impossible

$\{4,2,1,1\}=\{A,A,A,B\}$ Impossible

$\{3,3,1,1\}=\{A,A,B,B\}$ Solved by $A=3,B=1$. Eg. $31331819$

$\{3,2,2,1\}=\{A,A,B,C\}$ Solved by $A=2,B=3,C=1$. Eg. $21322319$ when the initial digit is not $3$ if the counted digits are put into ascending order.