Skip to content

Most digits with all pairwise sums different

Question

An integer has the property that adding any two of its digits (taken from different positions) never gives the same total twice; for instance 174174 works because 1+71+7, 1+41+4 and 7+47+4 are all different. What is the greatest number of digits such an integer can have?

Short answer

5. Digits must be distinct (a repeated digit plus any third digit gives a repeated sum), so we need a set of digits from 00 to 99 with all pairwise sums distinct. {0,1,2,4,7}\{0,1,2,4,7\} works (e.g. 7421074210), and a check of all six-element subsets shows none does, since six digits would need 1515 distinct sums.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution