The following iterative sequence is defined for the set of positive integers:
{ n = 2 n n = 3 n + 1 if n is even. if n is odd.
When the initial value of n is 13 the following sequence is formed and converges at 1:
1 3 4 0 2 0 1 0 5 1 6 8 4 2 1
What is the sum of all terms when n = 1 0 0 ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Same here !
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Problem Loading...
Note Loading...
Set Loading...
The computation can be easily done with a Microsoft Excel spreadsheet as follows. Enter at cell A1: "100", cell A2: "=IF(MOD(A1,2)=0,A1/2,3*A1+1)" and copy through to A26, that is until n = 1 . Then enter at cell A27: "=SUM(A1:A26)" to sum up all the n 's.