No, sorry. The digits of the numbers have to be distinct
doing what you explained would be a lot easier though
just use n(n+1)/2 from 1-10,000 and then again from 1-1000 and subtract the second from the first
I need to find the sum of all 4536 numbers with distinct digits from 1000 to 10000 (so 4 digit numbers). Now, I developed a primary method for a solution but its too time consuming! anybody have any clever ideas?