Add new comment
-
Want facts and want them fast? Our Maths in a minute series explores key mathematical concepts in just a few words.
What do chocolate and mayonnaise have in common? It's maths! Find out how in this podcast featuring engineer Valerie Pinfield.
Is it possible to write unique music with the limited quantity of notes and chords available? We ask musician Oli Freke!
How can maths help to understand the Southern Ocean, a vital component of the Earth's climate system?
Was the mathematical modelling projecting the course of the pandemic too pessimistic, or were the projections justified? Matt Keeling tells our colleagues from SBIDER about the COVID models that fed into public policy.
PhD student Daniel Kreuter tells us about his work on the BloodCounts! project, which uses maths to make optimal use of the billions of blood tests performed every year around the globe.
Hi there,
How does your calculation work?
I see your result:
Iteration Frequency
0 1
1 356
2 519
3 2124
4 1124
5 1379
6 1508
7 1980
But, my test gives:
[0] => 1
[1] => 356
[2] => 519
[3] => 2124
[4] => 1124
[5] => 1311
[6] => 1508
[7] => 1980
[10] => 68
See the difference on the 5th iteration. When I look back, this resulted from the following digits:
1000,1011,1101,1110,1112,1121,1211,1222,2111,2122,2212,2221,2223,2232
,2322,2333,3222,3233,3323,3332,3334,3343,3433,3444,4333,4344,4434,4443
,4445,4454,4544,4555,5444,5455,5545,5554,5556,5565,5655,5666,6555,6566
,6656,6665,6667,6676,6766,6777,7666,7677,7767,7776,7778,7787,7877,7888
,8777,8788,8878,8887,8889,8898,8988,8999,9888,9899,9989,9998
A random test with 3433 gives:
#1: 4333 - 3334 = 999
#2: 999 - 999 = 0
#3: 0 - 0 = 0
#4: 0 - 0 = 0
#5: 0 - 0 = 0
#6: 0 - 0 = 0
#7: 0 - 0 = 0
#8: 0 - 0 = 0
#9: 0 - 0 = 0
#10: 0 - 0 = 0
Can you clarify this? Maybe my calculations are wrong.
Thank you.
@ariefbayu