R
R
Roman Sotnichenko2018-12-11 15:20:53
Mathematics
Roman Sotnichenko, 2018-12-11 15:20:53

How to find a pattern between integers x and y?

Hey!
I have some tab for numbers [0; +inf):
x -> y
0 -> 0
1 -> 1
2 -> 9
3 -> 2
4 -> 8
5 -> 3
6 -> 7
7 -> 4
8 -> 6
9 -> 5
10 - > 5
11 -> 6
12 -> 4
13 -> 7
14 -> 3
15 -> 8
16 -> 2
17 -> 9
18 -> 1
19 -> 0
20 -> 0
21 -> 1
22 -> 9
etc...
Tell me, is it possible to derive some formula for calculating y from this table?
The set x can be reduced, leaving y true for every x, by changing x in the following function: F = 19 - (x % 10).
Then the set x will be reduced to 10 values ​​(E.g. x = 22, after applying the function x = 17. According to the table, what 17, what 22 gives 9):
19 -> 0
18 -> 1
17 -> 9
16 -> 2
15 -> 8
14 -> 3
13 -> 7
12 -> 4
11 -> 6
10 -> 5
And here is the same question. How to derive a formula for calculating y? In general, is it possible to get it here and am I moving in the right direction? You can solve the problem using this table, but ideally you would like to get by with one formula and count y each time.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question