Here are some notes about how to create, change , and plot data stored by lists. Many examples come from the book An Elementary Introduction To The Wolfram Language.

Make a plot of the first 10 squares, starting at 1.

ListPlot[Range[10]^2]

Make a combined list of the first 5 squares and cubes (numbers raised to the power 3), sorted into order

Sort[Join[Range[5]^2, Range[5]^3]]
{1, 1, 4, 8, 9, 16, 25, 27, 64, 125}

Find the number of digits in 2^128.

IntegerDigits[2^128]
{3, 4, 0, 2, 8, 2, 3, 6, 6, 9, 2, 0, 9, 3, 8, 4, 6, 3, 4, 6, 3, 3, 7, 4, 6, 0, 7, 4, 3, 1, 7, 6, 8, 2, 1, 1, 4, 5, 6}
Length[IntegerDigits[2^128]]
39

Find the first 10 digits in 2^100

Take[IntegerDigits[2^100], 10]
{1, 2, 6, 7, 6, 5, 0, 6, 0, 0}

Find how many zeros appear in the digits of 2^1000

Count[ IntegerDigits[2^1000], 0]
28

Make a line plot of the sequence of digits that appear in 2^128

IntegerDigits[2^128]
{3, 4, 0, 2, 8, 2, 3, 6, 6, 9, 2, 0, 9, 3, 8, 4, 6, 3, 4, 6, 3, 3, 7, 4, 6, 0, 7, 4, 3, 1, 7, 6, 8, 2, 1, 1, 4, 5, 6}
ListLinePlot[IntegerDigits[2^128]]

Use Take and Drop to get the sequence 11 through 20 from Range[100]

Drop[Take[Range[100], 20], 10]
{11, 12, 13, 14, 15, 16, 17, 18, 19, 20}

Make a list of the first 10 multiples of 3

Range[10]*3
{3, 6, 9, 12, 15, 18, 21, 24, 27, 30}

Make a pie chart of the sequence of digits that appear in 2^32.

PieChart[IntegerDigits[2^32]]

Make a list of pie charts for the sequence of digits in 2^20, 2^40, 2^60

List[PieChart[IntegerDigits[2^20]], PieChart[IntegerDigits[2^40]], PieChart[IntegerDigits[2^60]]]


0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
A prohibited operation
0
Would love your thoughts, please comment.x
()
x