
You can't google 9999999..99999999999999999999999 - reg29
http://www.google.com/search?q=9999999..99999999999999999999999
======
waterhouse
On a faintly related note, I once was calculating partitions, using a
relatively inefficient method (memoization: if f(n,k) is the number of
distinct ways to express n as the unordered sum of integers no greater than k,
then f(n,k) = f(n-k,k) + f(n,k-1)). My computer started to feel the strain in
the thousands (this algorithm is O(n^2) in space and time). I then googled for
the partition of, say, 1034, which is:

    
    
      91363785902248291467082481888195
    

I figured that chances are that no website will have that integer on there by
accident. Lo and behold, I found, among other results, a text file containing
the partitions up to 10,000, presumably done with a more efficient algorithm
(likely Euler's ridiculous pentagonal-number recurrence formula, which,
memoized, is roughly O(n^1.5) in time and O(n) in space):
<http://oeis.org/A000041/b000041.txt>

~~~
mattdeboard
Ridiculous in what way? Ridiculously good compared to alternatives, or
ridiculously complex or? Asking out of pure ignorance here.

~~~
waterhouse
So there are numbers called pentagonal numbers. You may be familiar with the
triangular numbers: 0 1 3 6 10 15 ..., with the formula n(n+1)/2, and the
square numbers: 0 1 4 9 16 ..., with the formula n^2. In general, the k-gonal
numbers begin with "0 1 k", and they are defined by a quadratic formula.

Incidentally, here's a fun little trick. If you have a sequence defined as the
values of a polynomial at consecutive integers, then if you take the
differences of consecutive terms of the sequence, you'll get a sequence that
is the values of a polynomial with degree 1 less. For example, I'll think of a
random quadratic. The sequence is:

    
    
      3 12 39 84 147 228 327 444 579
    

And then the consecutive differences are:

    
    
      3 12  39  84  147  228  327   444   579
       9  27  45  63   81   99   117   135
    

You might notice that the second row is a straight-line function. If we take
another set of differences...

    
    
      3 12  39  84  147  228  327   444   579
       9  27  45  63   81   99   117   135
        18  18  18   18   18   18    18
    

We end up with a constant function. (And I guess taking differences on a
constant function yields another constant.) Then, if we say that the sequence
started at index 0 (i.e. f(0) = 3, f(1) = 12, and so on), then I can tell you,
by looking at the leftmost elements of each row, that the polynomial was f(n)
= 3·(n choose 0) + 9·(n choose 1) + 18·(n choose 2), which comes out to be
9n^2 + 3. [1] That is in fact the polynomial I picked. This method is what
Martin Gardner called the "calculus of finite differences"; taking differences
is an analogue of taking derivatives, and the result is an analogue of Taylor
series.

Anyway, pentagonal numbers are defined like this [this is the only way that
makes sense to me, anyway]:

    
    
      0 1 5 ...
    

which gives us some differences:

    
    
      0 1 5 ...
       1 4 ...
        3 ...
    

and we know that the bottom is a constant, because it's the second difference
on a quadratic:

    
    
      0 1 5 ...
       1 4 ...
        3 3 3 3 3 3 3
      -->    ;now the bottom row is the differences of the row above it
      0 1 5 ...
       1 4 7 10 13 16 19 22
        3 3 3  3  3  3  3
      -->    ;and *that* is the differences of the top row
      0 1 5 12  22  35  51  70  92
       1 4 7  10  13  16  19  22
        3 3  3   3   3   3   3
    

Incidentally, this is the method of calculating values of polynomials that
Charles Babbage's Difference Engine was designed to do. It's nice and easy.
Anyway, back to theory about pentagonal numbers. Using the pseudo-Taylor
series method, we can read off "0·(n choose 0) + 1·(n choose 1) + 3·(n choose
2)" as our formula, which comes out to n(3n-1)/2. By the way, we can also plug
negative numbers into this formula (or, equivalently, we could take the
differences backward), which yields what are called the "generalized
pentagonal numbers":

    
    
      n       ... -6 -5 -4 -3 -2 -1 0 1 2  3  4  5  6 ...
      pent(n) ... 57 40 26 15  7  2 0 1 5 12 22 35 51 ...
      -->
      pent(n) sorted: 0 1 2 5 7 12 15 22 26 35 40 51 57 ...
    

Now, we define P(n) to be the number of partitions of n, i.e. the number of
distinct unordered ways to express n as the sum of positive integers. The
first several terms look like this:

    
    
      P(0): 0 = <nothing> --> 1
      P(1): 1 = 1          --> 1
      P(2): 2 = 2, 1+1        --> 2
      P(3): 3 = 3, 2+1, 1+1+1     --> 3
      P(4): 4 = 4, 3+1, 2+2, 2+1+1, 1+1+1+1   --> 5
      P(5): 5 = 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 1+1+1+1+1   --> 7
      P(6): 6 = 6,5+1,4+2,4+1+1,3+3,3+2+1,3+1+1,2+2+2,2+2+1+1,2+1+1+1+1,<six 1's> --> 11
    

You could compute several more by hand. Then the recursive formula I
originally described might occur to you, and you could make a computer
calculate it, perhaps up into the thousands. Now, what if I told you this:

    
    
      P(n) = P(n-1) + P(n-2) - P(n-5) - P(n-7) + P(n-12) + P(n-15) - ...
    

where that sequence "1 2 5 7 12 15" is the "generalized pentagonal numbers" I
described above? How the _hell_ are pentagonal numbers connected with
partitions? That's what I mean by ridiculous. ... The Wikipedia article in the
sister comment describes a proof of the connection. I still find it
counterintuitive.

[1] "Choose": <http://en.wikipedia.org/wiki/Binomial_coefficient>

~~~
mattdeboard
Thanks for the in-depth answer. This actually reminds me of Chebyshev
polynomials, which I was obsessed with in a very simple way last spring. But
I'm not advanced enough in maths to draw any concrete connection.

------
buro9
The double dot indicates that this is a ranged query.

11..22 would be to search for all integers between 11 and 22.

The effect is that the search is too broad. The problem is more likely to be
that the range search is a mapreduce that performs a search for each item in
the range.

You can imagine why that's a bad idea, and some aggressive timeouts are
probably what stop it from going too far.

Plus the numbers in the range of the OP search are likely to fall in the
ranges of sensitive numbers, credit cards being the most sensitive... which
are likely to be explicitly blocked.

~~~
hm2k
If this were true, surely it should allow you to use quotes to force it to
ignore the "range" operator...

[http://www.google.com/search?q=%229999999..99999999999999999...](http://www.google.com/search?q=%229999999..99999999999999999999999%22)

~~~
buro9
It ignores the quotes a lot of the time. They are less explicit than you may
imagine.

~~~
ma2rten
yup, "11..22" still finds all numbers from 11 to 22.

~~~
shithead
But '11..22' yields 11,22 11:22 11/22 etc.

Seems the Unix Bourne shell is seeping in - single quotes are for real, double
quotes allow param substitution ...

------
user24
The reason for this is that you can google ranges of numbers, and people a
couple of years ago were using this feature to find credit card numbers that
were posted online, eg searching for 4000000000000000..4999999999999999

It was around the time that johnny's google hacking page became popular, iirc.
(<http://www.hackersforcharity.org/ghdb/>)

------
hm2k
Yes you can:
[http://www.google.com/xhtml?q=9999999..999999999999999999999...](http://www.google.com/xhtml?q=9999999..99999999999999999999999)

~~~
roadnottaken
care to explain?

~~~
ciupicri
He might be referring to this:

Our systems have detected unusual traffic from your computer network. Please
try your request again later. Why did this happen?

IP address: x.y.z.t. Time: 2011-09-01T19:03:40Z URL:
[http://www.google.com/search?q=9999999..99999999999999999999...](http://www.google.com/search?q=9999999..99999999999999999999999)

~~~
palish
No idea why you've been downvoted --- this is what google says for me, too.

------
ck2
You also cannot google some stuff commonly found in phpBB because of so many
hacked sites out there.

Also remember how you used to be able to search for anything up to the 1000th
item (10 pages of 100 results). Not anymore for a long time now. Google sucks
it all in but won't share and play nice with others.

Why not allow such searches unless a bot is detected (too many pages too
quickly, etc.)

------
david927
"With all due respect John, I am the head of IT and I have it on good
authority that if you type 'Google' into Google, you can break the Internet."
-- The IT Crowd

------
martinkallstrom
I think this question is cool to think about and try to answer: What is the
lowest integer that doesn't have any hits on google? Is there any reasoning
that can help estimating the approximate magnitude it should be?

~~~
sovok
A problem might be that as soon as you discover that number, you can't tell
anyone on the web about it. This for example has no results as of now:
<http://google.com/search?q=813115181452319>

~~~
rufibarbatus
As of now, it has 3 results (all 3 pointing in some way or the other to your
own remark). Damn. That was fast!

~~~
JacobAldridge
Try (813115181452319 - 1) It's lower, has 0 results, and I'm not mentioning it
here!

------
jergosh
Guess they don't want you to search for credit card numbers

------
arrowgunz
Can someone please explain me why that happens? Google says - "Our systems
have detected unusual traffic from your computer network. Please try your
request again later."

~~~
wisty
It seems to slow down, as you increase from:

111..111 11111..111111

and eventually crashes.

I'm guessing there is some kind of grammar parser breaking horribly. There's
grammar parsers that have _extremely_ poor performance trying to parse stuff
that looks like this. It might do:

search 1 and 111111..11111

search 11 and 11111..11111

...

search 1 and 1 and 11111..111

...

...

...

and google detects that you are DOSing its server.

OK, someone else has pointed out that this is a range search, and google may
be protecting CC searches.

------
tsycho
Reading the comments here gave me an idea....google your own credit card
numbers to check if its already in some scammer's index. While no results
might not necessarily mean you are safe, a positive match is a clear red flag.

~~~
andrenotgiant
Even better, LOCK DOWN YOUR GOOGLE ACCOUNT WITH DOUBLE AUTHENTICATION, then
set Google alerts for your:

credit card, or if paranoid, partial credit card # "123456789 _"

Email address

Home address

Phone number

screen name (e.g.: "andrenotgiant" -site:ycombinator.com)

Bank acct partial

Password, Password partial "p@ssw0r_"

~~~
sausagefeet
Sweet, now someone just has to get into my google account settings and I'm
screwed.

~~~
brown9-2
I imagine this is why the parent poster mention enabling two-factor
authentication first.

~~~
adyus
Sweet, now someone has to get into parent's google account AND swipe his
phone!

~~~
burgerbrain
And my phone has my google account information.. :/

------
mikkohypponen
See these from May:
<https://twitter.com/mikkohypponen/status/72545823916961792>
<https://twitter.com/mikkohypponen/status/72574386430939136>
<https://twitter.com/mikkohypponen/status/72738322702802945>

~~~
iwiznia
So I guess mikkohypponen is the responsible for those searches not to work.
Interesting...

------
mahrain
Funny how Duckduckgo lists all sites linking to this story.

------
n0fair
Our systems have detected unusual traffic from your computer network. Please
try your request again later. Why did this happen?

~~~
atlbeer
Because what Google is preventing is the discovery of accidental credit cards
in it's index.

You searching for credits cards (via that ranged query) is a flag that the
search is possibly automated and they display the warning and catchpa as a
mitigator.

------
program
Neither

    
    
      1111111..11111111111111111111111
      11111111..1111111111111111111111
      111111..111111 // minimum case
    

or any other integer combination. 6 digits is the minimum amount that spawn
the bizarre error.

~~~
yogsototh
100000..100000 Neither

~~~
kiiski
There are 6 digits in that, which he mentioned was the minimum for getting an
error.

------
mikkohypponen
However, you _can_ still set Google Alerts for a search like that.

------
tete
I see why it doesn't work, but why doesn't it work with quotes either?

~~~
stuffedBelly
Maybe because the value of the string is also large that can cause overflow?
You mean you got the alert when you put in "999999999.....99999"?

------
known
<http://www.google.com/xml>

------
37prime
Take out a few 9's out and Google still returned an error:
<http://www.google.com/search?q=9999999..999999>

------
drungli
I tried also this: 9999999..999999 same results!

------
skeptical
Probably that string was used as a dork together with some more text to find
vulnerabilities on web applications or so. So it was reported as a honey

This does look like a string that could very much be generated by some poorly
coded webbapp. An incorrect usage of a floating point number can easily
generate such output. If it occurs on a critical part of an application it
could very well been used as a dork. Just an hypothesis though.

Back in 2005 google tricks were at their peak. Many hackers experimented with
search phrases in order to retrieve
interesting/valuable/uncommon/dangerous?/sensitive info from the web. "index
of/ .mp3" "apache server at port" being the absolute classic.

More and more people started to jump in the bandwagon, webmasters gradually
became more aware of this, and google too. The natural reaction was google
honeypot.

<http://ghh.sourceforge.net/>

But it wasn't too long until google started to remove such features. These
days one can hardly search for symbols on google. They the old tricks, most of
them will not work, google simply ignores the details and returns a list of
results based on the actual words contained in the query. It's becoming a QA
machine. That's one of the reasons I switched to duckduckgo.

For a proper reading on the subject check ou the vast website of the, now
deceased, great hacker Fravia: <http://www.searchlores.org/indexo.htm>

------
pointyhat
I get this:

Our systems have detected unusual traffic from your computer network. Please
try your request again later.

------
digamber_kamat
Change the last 9 to 8 and see what happens ?

------
fletchowns
Bing to the rescue:
[http://www.bing.com/search?q=9999999..9999999999999999999999...](http://www.bing.com/search?q=9999999..99999999999999999999999)

Pretty similar URL format eh?

~~~
humbledrone
Bing doesn't really come to the rescue -- the X..Y format on Google searches
for numbers in a range. Bing seems to just try to find that string as plain
text.

~~~
fletchowns
Yes, it doesn't hit some strange error page though.

~~~
brk
Correct.

Instead it returns some generally useless results that are likely not at all
what the user desired.

Truthfully this seems about what I expect from Microsoft.

~~~
Evgeny
_Instead it returns some generally useless results that are likely not at all
what the user desired_

If the user entered "9999999..99999999999999999999999" in the search box, what
would you say he desired to get in return?

Serious question, cause I have no clue about why would anyone genuinely want
to search for that ...

~~~
brk
In google the ".." between two sets of numbers indicates search for numbers
between the range of the two.

So, if Bing is trying to "emulate" google in that way for more advanced
queries, they are doing it wrong.

Since google is sort of the defacto standard for search right now, I would say
that Bing's response would be out of the ordinary for what a user accustomed
to doing those kinds of searches would expect.

