# Search:

Type: Posts; User: leeminho

1. ## Thread: HAILSTONE SEQUENCING

by leeminho
Replies
11
Views
711

### Re: HAILSTONE SEQUENCING

I tried that but it didn't work......

--- Update ---

*it didn't help
2. ## Thread: HAILSTONE SEQUENCING

by leeminho
Replies
11
Views
711

### Re: HAILSTONE SEQUENCING

Well my problem is that when i run my program, it keeps printing out 2 as the answer but the answer should be 8111. So i probably messed up with while(Sn != 472151 )
3. ## Thread: HAILSTONE SEQUENCING

by leeminho
Replies
11
Views
711

### Re: HAILSTONE SEQUENCING

public static void question3()
{
/*
1. S(n) stands for the sum of all the numbers in the Hailstone sequence beginning with n. For example, S(6) = 55 and
S(7) = 288. For what integer...
4. ## Thread: HAILSTONE SEQUENCING

by leeminho
Replies
11
Views
711

### Re: HAILSTONE SEQUENCING

public static void question3()
{

1. S(n) stands for the sum of all the numbers in the Hailstone sequence beginning with n. For example, S(6) = 55 and
S(7) = 288. For what integer n...
5. ## Thread: HAILSTONE SEQUENCING

by leeminho
Replies
11
Views
711

### Re: HAILSTONE SEQUENCING

If n is even, the next integer is n/2.
If n is odd, the next integer is 3n+1.

--- Update ---

this is my method so far...
public static void question3()
{
/*
1. S(n) stands for...
6. ## Thread: HAILSTONE SEQUENCING

by leeminho
Replies
11
Views
711

### HAILSTONE SEQUENCING

This is the task:
This puzzle involves sequences of integers known as Hailstone sequences. A Hailstone sequence begins with any positive integer and continues until it reaches 1. When a positive...
Results 1 to 6 of 6