Let f(x) be the sum of the prime factors of the positive integer x, including repeated factors. For example, f(20)=f(2x2x5)=2+2+5=9. Note that f(1)=0 and f(p)=p if p is prime.

Let g(x) be the function g(x)=f(ax+b), where a and b are positive integers. If we iterate g we obtain the sequence g

_{0}=x, g

_{1}=f(ag

_{0}+b) and g

_{n}=f(ag

_{n-1}+b). Such sequences always end in a cycle of length L. Some of these sequences terminate at a fixed point P with a cycle length of 0.

For example, if g(x)=f(3x+1) and x=14 we get the sequence {14, 43, 20, 61, 29, 17, 17} which terminates at the fixed point 17.

Let's look specifically at the function g(x)=f(5x+3).

a) Calculate the sequence generated from x=40 and find its value of L.

b) Find the two fixed points of this sequence that are both less than 100.

Note that such sequences have not been exhaustively analysed and there are a number of open questions that I will discuss in another post.

**Feel free to comment, ask questions and even check your answer in the comments box below powered by**~~Disqus~~ Google+.

**}**

**This space is here to avoid seeing the answers before trying the problem!**

*}*

**If you enjoy using this website then please consider making a donation - every little helps :-)**

**You can receive these questions directly to your email box or read them in an RSS reader. Subscribe using the links on the right.**

**Don’t forget to follow Gifted Mathematics on Google+, Facebook or Twitter. You may add your own interesting questions on our Google+ Community and Facebook..**

You can also subscribe to our Bookmarks on StumbleUpon and Pinterest. Many resources never make it onto the pages of Gifted Mathematics but are stored in these bookmarking websites to share with you.You can also subscribe to our Bookmarks on StumbleUpon and Pinterest. Many resources never make it onto the pages of Gifted Mathematics but are stored in these bookmarking websites to share with you.