2
$\begingroup$

Ben created a new type of number called 'a digital number'. (He's bad at naming things.)

When a number equals the sum of all its digits times its position in the given set (1 to 1000), it is called 'a digital number'.

For example, 1 is a 'digital number', because: 1 * (1st position) = 1

423 is not a 'digital number', because: (4+2+3) * (423rd position) = 3807

How many 'digital' numbers are there inside the given set 1 to 1000?

$\endgroup$
15
$\begingroup$

A number's position is equal to its value, so you're just asking for the numbers where the digital sum is 1. That would be 1, 10, 100, and 1000, so there are four.

$\endgroup$
  • $\begingroup$ I think he means that, for a number that's the concatenation of digits A, B, C, and D, in this order, it's a digital number, if and only if A + 2B + 3C + 4D. $\endgroup$ – Chill Fruit Mar 22 '16 at 12:53
  • $\begingroup$ @Chill: He said "sum of all its digits times its position in the given set", not "sum of all the digits times their position in the given number". $\endgroup$ – Deusovi Mar 22 '16 at 12:54
  • 2
    $\begingroup$ Why is 1000 excluded? $\endgroup$ – Ian MacDonald Mar 22 '16 at 13:04
  • 4
    $\begingroup$ @Ian: Because I read "1 to 1000" and thought "1 to 999" for some reason. $\endgroup$ – Deusovi Mar 22 '16 at 13:05
  • 1
    $\begingroup$ @FᴀʀʜᴀɴAɴᴀᴍ: Spoiler tags are not required. I find spoiler formatting annoying, so I prefer to omit it when I can't be bothered. $\endgroup$ – Deusovi Mar 22 '16 at 16:21
5
+50
$\begingroup$

Option 1: Aparently I misunderstood this be question.
Left here for historical reasons.
The numbers are:

1,2,3,4,5,6,7,8,9,19

Proof:

1000 is not a digital number
Let's consider the 3 digit number ABC where A is not 0.
So $100*A + 10 * B + C = 1*A + 2*B+3*C$
this becomes $99*A = 2*C - 8*B$
Since A B and C are digits, the min value for $99*A$ is 99 and the max value for $2*C - 8*B$ is 18 ($2*9-8*0$). So this cannot be.
Conclusion there are no 3 digit numbers like that.

Let's consider the 2 digit number $AB$.
So $10*A + B = 1*A+2*B$
This becomes $9*A = B$
Since A and B are digits, the only possible values are $A=1, B=9$. So $AB = 19$.

Let's consider the 1 digit number A.
So $A = 1*A$.
this is true for every number between 1 and 9 (even between 0 and 9).

Option 2:

let x be the number and s the sum of all it's digits
So $s *x = x$
This means $x = 0$ or $s=1$.
Since the set is from 1 to 1000, $x=0$ is not an option.
So $s = 1$.
The only numbers that satisfy this are $1, 10, 100, 1000$

$\endgroup$
  • 2
    $\begingroup$ You made the same mistake I had bub, he said the digit sum in relation to position in the set, not position in the actual number. $\endgroup$ – Chill Fruit Mar 22 '16 at 13:09
  • 1
    $\begingroup$ @ChillFruit. If 2 people made the same mistake it means the question was not clear. Wouldn't you say that? $\endgroup$ – Marius Mar 22 '16 at 13:11
  • $\begingroup$ He said "sum of all its digits times its position in the given set", not "sum of all the digits times their position in the given number". $\endgroup$ – Deusovi Mar 22 '16 at 13:13
  • 2
    $\begingroup$ I wouldn't necessarily say it's unclear; I'm known for reading things far too fast and making misunderstandings '-_-. $\endgroup$ – Chill Fruit Mar 22 '16 at 13:13
  • 1
    $\begingroup$ Guess the bounty's blurb got lost when it was delivered, Marius, but it basically repeated my comment here about your having solved 3 puzzles in one and receiving little credit for it. (I often wish I could beat the one-vote limit and finally realized how a bounty can amount to that.) $\endgroup$ – humn Oct 24 '16 at 6:43
0
$\begingroup$

I solved this the lazymans way,

(what follows is this is python code)

def addDigits(x):
   l = 0
   for char in str(x):
        l += int(char)
   return l

def offset(start, x):
    return x-(start-1)
def findDigitalNumbers(x,y):
    DNumbers = []
    for num in range(x,y+1):
        if( (addDigits(num) * offset(x, num))== num):
            print(num)
            DNumbers.append(num)
    return DNumbers

Using this i found that the numbers are

1, 10, 100, 1000

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.