Self Organizing Sequence

Consider the sequence with the following properties.

The first term a 1 a_1 is any natural number.

The subsequent numbers follow the rule

a n + 1 = { a n / 2 i f a n i s e v e n 3 a n + 1 i f a n i s o d d a_{n+1}=\left\{\begin{array}{lr}a_n/2 & if\ a_n\ is\ even\\ 3a_n+1 & if\ a_n\ is\ odd \end{array}\right.

What is the value of lim n i = 1 n a i n \lim_{n \to \infty} \frac{\sum_{i=1}^n a_i}{n}


The answer is 2.3333.

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.

2 solutions

The sequence ultimately converges to the repeating series ...,4,2,1,4,2,1,4,2,1...

So, at very large n n the average value tends to the average of the above three numbers.

Hence, the required answer is 4 + 2 + 1 3 = 2.333 \frac{4+2+1}{3}=\boxed{2.333}

That never happens. The series would actually look like ...,4,2,7,3.5,10.5,...

Amar Shah - 5 years, 10 months ago

Log in to reply

Let us say for a large n n , a n = 4 a_n=4

Then, as 4 is even a n + 1 = 4 / 2 = 2 a_{n+1} = 4/2 =2 and since 2 is 'even' a n + 2 = 2 / 2 = 1 a_{n+2} = 2/2 =1 Now, 1 is odd, hence a n + 3 = 3 1 + 1 = 4 a_{n+3} = 3*1+1 = 4

You seem to have swapped the formula for even and odd a n a_n .

Janardhanan Sivaramakrishnan - 5 years, 10 months ago

Isn't this based off the unproven Collatz conjecture?

Jared Low - 5 years, 8 months ago
Brock Brown
Feb 18, 2015

Python:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from fractions import Fraction as frac
memo = {1:1}
def a(n):
    if n in memo:
        return memo[n]
    if a(n-1) % 2 == 0:
        memo[n] = frac(a(n-1),2)
    else:
        memo[n] = 3*a(n-1)+1
    return memo[n]
def f(n):
    total = 0
    for i in xrange(1, n+1):
        total += a(i)
    return frac(total,n)
infinity = 150
print "Answer:", float(f(infinity))

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...