I'm fooling around with the 3n+1 problem and I wanted to see if I could find how many prime numbers were in any given sequence of numbers where I chose the starting point. You can see my code here and while it works for the most part, for some values it doesn't.
I can't seem to find a pattern either. It works with the input of 22 and 80 but not 100 or 25. Those are only a few that I've tried, and I inserted cout statements in to track the progression of it...and it just seems like it quits at random points.
If anyone could possibly tell me the problem I'd greatly appreciate it. Thanks!
I can't seem to find a pattern either. It works with the input of 22 and 80 but not 100 or 25. Those are only a few that I've tried, and I inserted cout statements in to track the progression of it...and it just seems like it quits at random points.
If anyone could possibly tell me the problem I'd greatly appreciate it. Thanks!