Elegant Little Plot

Here is a simple sequence that generates an elegant little plot.

Take each integer, and subtract from it the product of its decimal digits. When you plot the results, it looks like this:

IMG_2165.jpeg

While perhaps not the deepest result, it is aesthetically pleasing and extremely simple to program.

The script in Mathematica that generated this image was

points = {};

Do[AppendTo[points, n - (Times @@ IntegerDigits[n])], {n, 50000}];

ListPlot[points];

Although I have not given these structures much though, I’m fairly confident that the drooping features will occur just below multiples of 10. To see why, consider n = 999. The 999th element of the sequence will be 999-9^3 = 270. And yet, when n = 1000, the corresponding element of the sequence will be 1000-(1*0*0*0) = 1000. So the more 9’s (and less so 8’s, and even less so 7’s, and so on) a number has, the more will be subtracted.


This sequence, along with many other interesting ones, can be found at http://oeis.org, which is the Online Encyclopedia of Integer Sequences.