Hardy–Ramanujan number generalization \$1729\$, known as the Hardy–Ramanujan number, is the smallest positive integer that can be expressed as the sum of two cubes of positive integers in two ways (\$12^3+1^3=10^3+9^3=1729\$).  Given an integer \$n\$ (as input in whatever form is natural to your language of choice) find the smallest positive integer that can be expressed as the sum of two positive integers raised to the \$n\$th power in two unique ways.  No use of external sources.  Fewest characters wins.
Note that this is actually an unsolved problem for \$n&gt;4\$.  For those numbers, let your program run forever in search, or die trying!  Make it so that if given infinite time and resources, the program would solve the problem.
APL  45  41
{⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1}

Shorter but slower version of 41 chars:
{⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⍺:⍺⋄⍵∇⍨⍺+1}

You can try it online, just paste the function and invoke it with a number:
      {⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1} 2
50
      {⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1} 3
1729

(The algorithm is quite dumb though, don't expect the online interpreter to compute n=4)
The answer for n=2 is 50 = 5² + 5² = 7² + 1² because its a number that &quot;can be expressed as the sum of two squares of positive integers—doesn't say different—in two ways.&quot;
If you want to add the distinct clause, just change (v∘.≤v) into (v∘.&lt;v), same number of chars, and n=2 becomes 65:
      {⍺←1⋄2≤+/,⍺=(v∘.&lt;v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1} 2
65

I'm beating GolfScript? Can't be!!