INTERNET SPECIAL, Fall Semester 2001

Let x_1 be a natural number and define a sequence x_n recursively as follows: If x_n is even, just divide x_n by 2 to get x_{n+1}. If, however, x_n is odd, multiply x_n by 3 and add 1, and then divide the result by 2 to obtain x_{n+1}. Write a program that lets you plug in the starting value x_1 and a number N and that then calculates and prints the first N values of the sequence. Try your program with x_1=23 and N=100. See what happens. Try more values of x_1. Turn in a printout of the program as well as test runs for any 15 values of x_1 that you like. But hurry! This special extra credit internet offer of 30 fabulous Math 2051 points is only good until this coming Monday, November 19, 2001, absolutely no later than 5:30 pm in either my office SH-311 or in my mailbox in the second floor of the Crawford building.