## Web That Smut

Back in the old days, we used to play a game on the internet called “web that smut”.

The basic idea was that you’d pick a page – say, the home page of Nike – and your opponent would say “I can web that smut in 12” . Then you’d bid down in the manner of “Name That Tune”.

• I can web that smut in 11
• I can web that smut in 8
• Web that Smut!!

The challengee would then be obliged to – just by clicking, no typing – get from the Nike home page to a porn site in 8 clicks. The basic strategy was that if you could get to the yahoo home page it was Society ->People and Places -> Sexuality -> Magazines then you were looking at naked bodies.

It was pretty easy in the old days because every page had a list of “Links” and everyone linked to Yahoo. It’s harder now because no-one wants to link to Other Sites.

But now there is We Heart It and clicking to porn is a feasible activity again and I hereby challenge you.

I can web that smut in 12:

http://weheartit.com/entry/912969

## Problem 12

To save you going all the way to Project Euler to read it, I have copied problem 12 here for your puzzle solving convenience…

The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28.

The first ten terms would be:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, …

Let us list the factors of the first seven triangle numbers:

1: 1
3: 1,3
6: 1,2,3,6
10: 1,2,5,10
15: 1,3,5,15
21: 1,3,7,21
28: 1,2,4,7,14,28

We can see that 28 is the first triangle number to have over five divisors.

What is the value of the first triangle number to have over five hundred divisors?

In case you were wondering, the answer to problem 10 is

``````
primes = Primes.new
puts primes.find_primes_less_than(2000000).inject{|s,n| s+n}

``````

How come inject and collect haven’t caught on in other languages? They are awesome.

## Forgetful me

According to Kurzweil, the singularity (the moment when we will start to invent things instantaneously) will occur in 2045. According to me the singularity (the moment when I forget things fast than I can learn things) occurs in 2009.

Every time I start over with Ruby (or XSLT or …) I find that I have forgotten the most basic things (like how to construct an object).

Anyway, thanks to Project Euler (according to which, I am 4% genius), I had an excuse to go go back and learn Ruby all over again.

Here’s my prime number generator (which is about a third of the size of my Java version):

``````
class Primes
def initialize
@primes = []
@next_candidate = 2
end

def prime? number
root = Math.sqrt number
find_primes_less_than root

@primes.each do |prime|
return true if prime > root
return false if number % prime == 0
end
end

def find_primes_less_than limit
until @next_candidate > limit
@primes << @next_candidate if prime? @next_candidate
@next_candidate += 1
end
end

def [] index
until @primes.size > index
find_primes_less_than @next_candidate + 100
end
return @primes[index]
end
end

``````

The answer to problem #7 is @primes[10000], in case you were wondering.

## Stuck on Stage 6

I Stumbled Upon a cool site for kids at the BBC. They have a whole bunch of games but I am playing this one: Questionaut Key Stage 2.

It’s a bit like the Python Challenge for little kids.

I am stuck on Stage 6 and was feeling silly because the quiz had been pretty easy up to that point. I tried to google the answer but it turns out that a lot of people are stuck on stage 3 ðŸ™‚

I decided to stay stuck for a while and not look at the answer. Maybe my son will come to my rescue?

There are more puzzles there. Some easier, some harder. Fantastic site.