# A basic calculator, a simple game. What was I playing at? [duplicate]

Yesterday I was doodling around with my very simple calculator as shown in the picture.

First I would enter a few digits to make an integer (i.e. no decimal places). Then I would perform a simple calculation to get a second integer. At first I chose the numbers carefully as shown in the following list. I chose four digit numbers and, as you can see, I got some two digit answers. I wasn't exactly surprised because I had chosen the starting numbers specifically to yield those answers:

3194, 17

3195, 18

4276, 19

5429, 20

6709, 22

8843 23

Next, instead of choosing the starting numbers myself, I removed any bias by using a random-number generator. I set it to give numbers between 1000 and 9999 inclusive. I then did the same calculation as before. Here are some of the results.

1127, 13

1152, 14

1318, 16

1362, 18

1386, 20

1450, 17

1491, 14

1536, 18

1628, 20

1662, 19

1666, 20

1838, 21

1987, 19

2305, 21

2373, 19

2591, 18

2658, 23

2693, 22

2868, 25

3132, 17

3317, 16

3320, 21

3547, 18

3598, 23

3615, 18

3660, 23

Notes

1. I omitted a tag that would probably have given the answer away. I substituted the tag enigmatic-puzzles
2. As stated, the first list was biased by the numbers I chose. However all the numbers, in both lists, were subjected to the same calculation in order to arrive at the answers.

3. It is possible to calculate the second column using very simple arithmetic.

4. I have sorted the first columns into numerical order. However the order has no effect on the answers. I just did it for neatness.

5. The answer can be worked out purely from the second, randomly generated list. You don't need the first list at all. However the first list is 100% correct and I included it because it might possibly give you a clue or at least start you on the right path.

6. At no stage in the calculation will you encounter any decimal points - only integers.

Questions

A. What game was I playing? Or rather what consistent calculation did I perform on all the above 4 digit integers in order to derive the second column?

B. To get the green tick, look at the number on the calculator. It is 1234567890. If I performed the same calculation on that number, what would be the result in the second column?

• Is only a single operation used for each pair? Also, is the operation relative to the first number or is it exactly the same each time? – 2xedo Aug 23 '15 at 14:52
• I like how after reading the first list of numbers you think "No, that can't be! That's too easy! You just have to calculate the sum of adding each digit of the number"... Then the second list ruins it :P – user14478 Aug 23 '15 at 14:53
• @2xedo & moonbutt74 - It depends what you mean by 'step' or 'operation'. For example, if I multiply 12 * 23 by using long-multiplication, it takes several steps but there is only one calculation! I mean that there is no chain of different calculations. Just one calculation gets to the answer. – chasly from UK Aug 23 '15 at 15:00
• @chaslyfromUK I was thinking you might have done something like (first number) * 7 / 3 * 44 - 2 = (second number) – 2xedo Aug 23 '15 at 15:01
• @randal'thor - That's the eternal problem here. In most communities the title alone is usually sufficient to detect repeats. Here we have to hide the details or there is no puzzle. – chasly from UK Aug 23 '15 at 16:35

The number produced for your current calculator number is:

50

The calculation used to reach this answer is:

Count the segments that are shown on the calculator's display.

The omitted tag is:

seven-segment

• that is evil! xD – moonbutt74 Aug 23 '15 at 15:13
• Yeah... Because why would he put a random calculator (with all numbers from 0-9, everything that we need) as an image if it hasn't got anything to do with the solution, I mean... I think we all know how a calculator looks like :D Every time after the solution is given it all makes so much sense! – user14478 Aug 23 '15 at 15:16
• Incidentally I used a computer to generate all the numbers and do the calculation as I didn't trust my arithmetic and was too lazy to do it by hand! Nevertheless it can easily be checked and solved by hand. Also the answer can be found without any need for any more mathematical skills than the average ten-year-old could manage. – chasly from UK Aug 23 '15 at 15:27