Arithmatic Sequence: A sequence of numbers in which the next number in the sequence can be obtained by adding or subtracting the same number.
Geometric Sequence: A sequence of numbers in which the next number in the sequence can be obtained by multiplying or dividing.
These LOGO procecures accompany pages 6-11 in the eighth grade math book. There are five procedures that illustrate how LOGO can be used to produce the patterns in the first five exercise on page 8. There is also a procedure to produce the fibonacci sequence on page 10.
Problem | Logo Procedure | Results |
No. 9 5,7,9,11,... |
to seq9 :n if :n > 20 [stop] pr :n seq9 :n + 2 ; <-- arithmatic end |
? seq9 5 5 7 9 11 13 15 17 19 |
No. 10 95,91,87,83,... |
to seq10 :n if :n < 65 [stop] pr :n seq10 :n - 4 ; <-- arithmatic end |
? seq10 95 95 91 87 83 79 75 71 67 |
No. 11 2,8,32,128,... |
to seq11 :n if :n > 10000 [stop] pr :n seq11 :n * 4 ; <-- geometric end |
? seq11 2 2 8 32 128 512 2048 8192 |
No. 12 1,5,25,125,... |
to seq12 :n if :n > 20000 [stop] pr :n seq12 :n * 5 ; <-- geometric end |
? seq12 1 1 5 25 125 625 3125 15625 |
No. 13 1,4,9,16,... |
to seq13 :n if :n > 8 [stop] pr :n * :n ; <-- neither arith. or geom. seq13 :n + 1 end |
? seq13 1 1 4 9 16 25 36 49 64 |
Sequence | Logo Procedure | Results |
1,1,2,3,5,8,13,... | to fib :a :b ; The fibonacci Sequence if :b > 1000 [stop] pr :b fib :b :a + :b end |
? fib 0 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 |