The "I am very bored" thread!

Page 3/4
1 | 2 | | 4

By norakomi

Paladin (992)

norakomi's picture

07-06-2006, 10:49

Nooooooooooooo... a number cannot start with zero Wink You are on the right track though Smile But, it is not that simple Doh
Well if I would continue this sequence I will find the number, or is my theory not correct.
Then it might get interesting after all !! haha

ok, continuing sequence:

00.000*7=0
0+40.579=40.579

400.000*7=2.800.000
2.800.000+40.579=2.840.579

8.000.000*7=56.000.000
56.000.000+2.840.579=58.840.579

80.000.000*7=560.000.000
560.000.000+58.840.579=618.840.579

100.000.000*7=700.000.000
700.000.000+618.840.579=1.318.840.579

3.000.000.000*7=21.000.000.000
21.000.000.000+1.318.840.579=22.318.840.579

20.000.000.000*7=140.000.000.000
140.000.000.000+22.318.840.579=162.318.840.579

600.000.000.000*7=4.200.000.000.000
4.200.000.000.000+162.318.840.579=4.362.318.840.579

pffff, now it gets boring.
I think i did something wrong

one hint please:
tell me,

does you number end with ......3.623.188.405.797 ???

(because multiply this with 7 and you get 25.362.318.840.579)

and... your number starts with 11 , right ?

By norakomi

Paladin (992)

norakomi's picture

07-06-2006, 10:54

Now, about the sequence, that was really tough. I had to plot them on Matlab, and they looked like a quadratic function, and then out of nowhere, I saw it
0 = 0 * 1 * 2
6 = 1 * 2 * 3
24 = 2 * 3 * 4
60 = 3 * 4 * 5
120 = 4 * 5 * 6
210 = 5 * 6 * 7
which means the next number should be
6 * 7 * 8 = 336 Smile
YEAAAAAAAAAH !!! goooood job !!

By someone2

Resident (34)

someone2's picture

07-06-2006, 15:36

one hint please:
tell me,

does you number end with ......3.623.188.405.797 ???

(because multiply this with 7 and you get 25.362.318.840.579)

and... your number starts with 11 , right ?

Yes, you are absolutely right. These are the last 13 digits Smile You are getting close too, it doesn't take much longer from now Smile

But, no the number doesn't start with 11! Sorry Wink

By someone2

Resident (34)

someone2's picture

07-06-2006, 15:38


Tsk, as long as you can write a nice math equation for it, it can be solved with brute force:

Iterate over N: (N*10 + 7) * 7 == int(log10(N)+1)*7 + N

I'll leave the programming as an exercise for the reader Cool

No. as you can see the number is larger than 13 digits. It can't even be represented as a long long! Smile So, iterating is going to take billions of years Wink Wink

By AuroraMSX

Paragon (1901)

AuroraMSX's picture

07-06-2006, 16:26


Tsk, as long as you can write a nice math equation for it, it can be solved with brute force:

Iterate over N: (N*10 + 7) * 7 == int(log10(N)+1)*7 + N

I'll leave the programming as an exercise for the reader Cool

No. as you can see the number is larger than 13 digits. It can't even be represented as a long long! Smile So, iterating is going to take billions of years Wink Wink
So what? You stated the problem cannot be solved with brute force, I just showed that it is possible -- you just need a bit of patience Tongue

(Or you could convert norakomi's pattern searching into an algorithm... I not so bored that I'm going to post that, but it is possible and will find the number faster than brute force)

By AuroraMSX

Paragon (1901)

AuroraMSX's picture

07-06-2006, 16:53

Here's another one. How does this sequence continue?

0001001101011110...

By someone2

Resident (34)

someone2's picture

07-06-2006, 16:56

Here's another one. How does this sequence continue?

0001001101011110...
Hmm...
0001001101011110
could be decomposed to
0001 0011 0101 1110
1 3 5 7

so, it should continue
0001001101011110 1001 1011...

By someone2

Resident (34)

someone2's picture

07-06-2006, 16:58

And speaking of sequences, here is another one
4, 5, 9, 11, 12, 13, 14.....
How should it continue?

(Hint: This is called the "Even Steven" sequence!)

By AuroraMSX

Paragon (1901)

AuroraMSX's picture

07-06-2006, 18:19

I not so bored that I'm going to post that, but it is possible and will find the number faster than brute force)
Ah well, what the heck. Here goes - in Java for a change Smile

public class Norakomis7{
	public static void main(String[] args) {
		int lastDigit = 7;
		int carry = 0;
		int value;
		boolean ready;
		
		Vector<Integer> digits = new Vector<Integer>();

		digits.add(new Integer(lastDigit));
		
		do {
			value = lastDigit * 7 + carry;
			lastDigit = value % 10;
			carry = value/10;
			ready = (lastDigit == 7 && carry == 0);
			if(!ready)
				digits.add(0, new Integer(lastDigit));
		} while(!ready);
		
		for(Iterator<Integer> it = digits.iterator(); it.hasNext(); )
		{
			System.out.print(it.next());
		}
		System.out.println();
	}
}

The output is 1014492753623188405797

As for the sequence, your solution sounds valid, but is not what I anticipated:
0001 0011 0101 1110 0010 0110 1011 1100 ...
Now, how does the sequence continue? Smile

By AuroraMSX

Paragon (1901)

AuroraMSX's picture

07-06-2006, 19:14

Code cleanup

...		
		value = lastDigit * 7 + carry;
		while (value != 7) {
			lastDigit = value % 10;
			carry = value/10;
			digits.add(0, new Integer(lastDigit));
			value = lastDigit * 7 + carry;
		};		
...

Smile

Page 3/4
1 | 2 | | 4