Digits with distinct pairwise sums

What is the largest nn for which there exists an nn-digit number whose digits are distinct and have all distinct pairwise sums? (For n=3n = 3, e.g. 174174 works since 1+71+7, 1+41+4, 7+47+4 are all different.)

Show hints (2)+
  1. The digits must form a Sidon set (all pairwise sums distinct) within {0,,9}\{0,\dots,9\}.
  2. Size-55 works (e.g. {0,1,2,4,7}\{0,1,2,4,7\}); size-66 has (62)=15\binom62=15 sums that can't all be distinct in range.

Answer

Reveal answer →

5

Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.

Asked at: Jane Street, Two Sigma

Related questions