CoCalc Public Filestmp / 2016-03-28-150801.sagews
Author: William A. Stein

# crazy examples...

a = 1
v = []
for i in range(100):
a *= 2
print i+1, str(a)[0],"|",
v.append(int(str(a)[0]))

1 2 | 2 4 | 3 8 | 4 1 | 5 3 | 6 6 | 7 1 | 8 2 | 9 5 | 10 1 | 11 2 | 12 4 | 13 8 | 14 1 | 15 3 | 16 6 | 17 1 | 18 2 | 19 5 | 20 1 | 21 2 | 22 4 | 23 8 | 24 1 | 25 3 | 26 6 | 27 1 | 28 2 | 29 5 | 30 1 | 31 2 | 32 4 | 33 8 | 34 1 | 35 3 | 36 6 | 37 1 | 38 2 | 39 5 | 40 1 | 41 2 | 42 4 | 43 8 | 44 1 | 45 3 | 46 7 | 47 1 | 48 2 | 49 5 | 50 1 | 51 2 | 52 4 | 53 9 | 54 1 | 55 3 | 56 7 | 57 1 | 58 2 | 59 5 | 60 1 | 61 2 | 62 4 | 63 9 | 64 1 | 65 3 | 66 7 | 67 1 | 68 2 | 69 5 | 70 1 | 71 2 | 72 4 | 73 9 | 74 1 | 75 3 | 76 7 | 77 1 | 78 3 | 79 6 | 80 1 | 81 2 | 82 4 | 83 9 | 84 1 | 85 3 | 86 7 | 87 1 | 88 3 | 89 6 | 90 1 | 91 2 | 92 4 | 93 9 | 94 1 | 95 3 | 96 7 | 97 1 | 98 3 | 99 6 | 100 1 |

Check this out...

stats.TimeSeries(v).plot_histogram()