# Ben's numbers - Digital Numbers

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?

-

## 3 Answers

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.

-
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. – Chill Fruit Mar 22 at 12:53
@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". – Deusovi Mar 22 at 12:54
Why is 1000 excluded? – Ian MacDonald Mar 22 at 13:04
@Ian: Because I read "1 to 1000" and thought "1 to 999" for some reason. – Deusovi Mar 22 at 13:05
@FᴀʀʜᴀɴAɴᴀᴍ: Spoiler tags are not required. I find spoiler formatting annoying, so I prefer to omit it when I can't be bothered. – Deusovi Mar 22 at 16:21

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$

-
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. – Chill Fruit Mar 22 at 13:09
@ChillFruit. If 2 people made the same mistake it means the question was not clear. Wouldn't you say that? – Marius Mar 22 at 13:11
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". – Deusovi Mar 22 at 13:13
I wouldn't necessarily say it's unclear; I'm known for reading things far too fast and making misunderstandings '-_-. – Chill Fruit Mar 22 at 13:13
I agree that the question was unclear. This is because the example provided was 1 * 1 = 1, which tells us exactly nothing about the intended origins of the numbers involved. I added an extra example in hopes that it either helps to explain the puzzle or cause the puzzle creator to reword it to get the intended puzzle – Ian MacDonald Mar 22 at 13:21

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

-