\(\(\(1.\)  \(Do\)\(\ \)\(コマンド\)\(
\)\)\)

c := 1
Do[c = 2*c + 1, {3}]; c

Do[c = 2*c + 1, {3}]; c

d := 1

Do[d = 2*d^2 + 2, {2}]; d

Do[d = 2*d^2 + 2, {2}]; d

\(\(\(
\)\(
\)\(\(2.\)  \(Module\)\(\ \)\(コマンド\)\(
\)\)\)\)

Module[{d = 1}, Do[d = 2*d^2 + 2, {2}]; d]

a[n_] := Module[{d = 1}, Do[d = 2*d^2 + 2, {n}]; d]

a[0]

a[1]

a[2]

\(\(\(
\)\(
\)\(\(3.\)  \(数列の定義\)\(
\)\)\)\)

b[1] := 5

b[n_] := b[n - 1] + 3

{b[1], b[2], b[3]}

Table[b[k], {k, 1, 100}]