Hi all.
I am working my way through the exercises on this page:
https://www.wolfram.com/language/elementary-introduction/06-making-tables.html
However I am stuck on Q. 6.10: Make a list line plot of the first digits of the first 100 squares.
IntegerDigits[Range[100]^2]
results in:
{{1},{4},{9},{1,6},{2,5},{3,6},{4,9},{6,4},{8,1},{1,0,0},{1,2,1},{1,4,4},{1,6,9},{1,9,6},{2,2,5},{2,5,6},{2,8,9},{3,2,4},{3,6,1},{4,0,0},{4,4,1},{4,8,4},{5,2,9},
{5,7,6},{6,2,5},{6,7,6},{7,2,9},{7,8,4},{8,4,1},{9,0,0},{9,6,1},{1,0,2,4},{1,0,8,9},{1,1,5,6},{1,2,2,5},{1,2,9,6},{1,3,6,9},{1,4,4,4},{1,5,2,1},{1,6,0,0},{1,6,8,1},
{1,7,6,4},{1,8,4,9},{1,9,3,6},{2,0,2,5},{2,1,1,6},{2,2,0,9},{2,3,0,4},{2,4,0,1},{2,5,0,0},{2,6,0,1},{2,7,0,4},{2,8,0,9},{2,9,1,6},{3,0,2,5},{3,1,3,6},{3,2,4,9},
{3,3,6,4},{3,4,8,1},{3,6,0,0},{3,7,2,1},{3,8,4,4},{3,9,6,9},{4,0,9,6},{4,2,2,5},{4,3,5,6},{4,4,8,9},{4,6,2,4},{4,7,6,1},{4,9,0,0},{5,0,4,1},{5,1,8,4},{5,3,2,9},
{5,4,7,6},{5,6,2,5},{5,7,7,6},{5,9,2,9},{6,0,8,4},{6,2,4,1},{6,4,0,0},{6,5,6,1},{6,7,2,4},{6,8,8,9},{7,0,5,6},{7,2,2,5},{7,3,9,6},{7,5,6,9},{7,7,4,4},{7,9,2,1},
{8,1,0,0},{8,2,8,1},{8,4,6,4},{8,6,4,9},{8,8,3,6},{9,0,2,5},{9,2,1,6},{9,4,0,9},{9,6,0,4},{9,8,0,1},{1,0,0,0,0}}
Now I would like to count the length of individual elements in the above list ie. {1,1,1,2,2,2,2,2,2,3,3,3....}. But how?
Thanks in advance.
D
EDIT: This is not homework. I am self-learning Mathematica, and will be doing all the exercises in all 47 Chapters, which will probably take me a few weeks to a few months. Hence you may see me asking lots of questions in this forum! :)