Recently in Puzzles Category

I know I'm late, but anyway here is the latest Dimitre's puzzle. Don't post your anwers here, just send them him to dnovatchev AT gmail DOT com. Dimitre will be collecting answers only for another week, so hurry up.

I just started reading the book "The Da Vinci code" and this resulted in having some fun with XSLT 2.0, Saxon 8.4 and Saxon.NET.

Here's the problem:

Find the first 10-digit prime in consecutive digits of F-3000

Where F-N is the Nth Fibonacci number.
Here are the elements of the sequence of Fibonacci numbers from 0 to 11:

Element: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144
Index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

It is *very important* to note that the first "1" in the sequence has index "0", so that everyone will mean the same thing by F-3000

When you have the answer, please, let me know:

1. The 10 digit prime number
2. The xslt code
3. The stylesheet execution time.
4. Your computer -- CPU speed and RAM
5. Whether or not you used any specific extension functions.

Ok, last one:

Consider a function which, for a given whole number n, 
returns the number of ones required when writing out all numbers 
between 0 and n. For example, f(13) = 6. Notice that f(1) = 1. 
What is the next largest n such that f(n) = n? 
Again I failed to solve it with no help from my old good Pentium :( I came up with some sort of formula, which I believe is right, but the number seemed to be quite big, so... 5-lines of code solved it. Can anybody show how it can be deducted in mind?

PS. Oh, forgot to mention - the puzzles were taken from the GLAT.

Yet another google puzzle

| 16 Comments | No TrackBacks |

And what about this one:

             1   1
             2   1
          1  2   1   1
       1  1  1   2   2   1

What is the next line?
I found several solutions, one better and couple of not really, but all of them don't match another property this sequence looks like to be following. Hmmm.

Another google puzzle

| 14 Comments | No TrackBacks |

Here is another cool puzzle from google:

Solve this cryptic equation, realizing of course that values 
for M and E could be interchanged. No leading zeros are allowed.


Should admit I failed to solve it with just a pen and a piece of paper. Or I'm stupid or was too busy, but I wrote a small C# program in just two minutes and my computer cracked it down in another couple of minutes by a brute force. Viva computers - no brains are needed anymore :)


| 12 Comments | 3 TrackBacks |

Ok, this is a simple one, if
XML + XSLT = 5
RSS + ATOM = 7

Then what is

Ok, this is not a new one, but just for those who somehow missed it (just like me).
A cool puzzle to solve: { First 10 digit prime in consecutive digits of e }.com

How much time does it take for you to crack it? My full time is about an hour (I'm not so good on sequences apparently).

PS. Try not to google for hints.
PPS. Please no spoilers in comments.