Live data from Hacker News

Fun with math: Dividing one by 998001 yields a surprising result

iheartchaos.com

51–60 of 99 posts

Re: Fun with math: Dividing one by 998001 yields a surprising result

#51

Earlier quoted context omitted.

A quicker proof is to just differentiate. For |r| 1 + r + r^2 + ... = 1/(1-r) Differentiate both sides of the equation: 1 + 2r + 3r^2 + ... = 1/(1-r)^2 Here's a bijective combinatorial proof, which I like best of all. It uses the concept of generating functions. As a caveat, it only shows the equality for formal power series, not analytic power series. The series 1 + r + r^2 + ... = 1/(1-r) is the type of tuples with…

Thanks ...the differential proof is very insightful and perhaps says something about differentiation itself. EDIT 1: Forgive my ignorance but can you please elaborate on 1 + r + r^2 + ... = 1/(1-r) is the type of tuples with entries in r ? EDIT 2: Okay I think I get it. 1 + r + r 2 are the terms in the expansion of (1+r) n

It does say something important about differentiation, which shows up very clearly and explicitly in the theory of generating functions and combinatorial species, and relates to my second proof. When you differentiate a type, you get the type of its splittings or what Conor McBride calls its one-hole contexts.

> >1 + r + r^2 + ... = 1/(1-r) is the type of tuples with entries in r ?

r^n is the type of n-tuples with entries in r. When you sum over all n, you get the type of tuples of any length with entries in r.

One thing that might be confusing you is that I'm thinking of r itself as a type, not as a number. You get a number from a type by counting its elements, but a type has much more structure than just its size.

Re: Fun with math: Dividing one by 998001 yields a surprising result

#54

Incidentally, understanding how this works is helpful to programmers. If you know why this happens, you'll know why you can't write: double x = 0.1; and get something that works.

> you can't write ... and get something that works.

That's taking things a bit far, isn't it? Sure, you can't exactly express 0.1 as a double - but you can get many things that work really well using the approximation.

Re: Fun with math: Dividing one by 998001 yields a surprising result

#56

Earlier quoted context omitted.

A quicker proof is to just differentiate. For |r| 1 + r + r^2 + ... = 1/(1-r) Differentiate both sides of the equation: 1 + 2r + 3r^2 + ... = 1/(1-r)^2 Here's a bijective combinatorial proof, which I like best of all. It uses the concept of generating functions. As a caveat, it only shows the equality for formal power series, not analytic power series. The series 1 + r + r^2 + ... = 1/(1-r) is the type of tuples with…

Thanks ...the differential proof is very insightful and perhaps says something about differentiation itself. EDIT 1: Forgive my ignorance but can you please elaborate on 1 + r + r^2 + ... = 1/(1-r) is the type of tuples with entries in r ? EDIT 2: Okay I think I get it. 1 + r + r 2 are the terms in the expansion of (1+r) n

[deleted]

Re: Fun with math: Dividing one by 998001 yields a surprising result

#59
post #4

This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums

In ruby (irb):

require 'bigdecimal'; BigDecimal.new(1).div(998001, 2997)

Re: Fun with math: Dividing one by 998001 yields a surprising result

#60
post #38

The link is blocked at my workplace. I really don't understand how their filter system works.

Ha ha, mine too. It says it's "adult content". There's a special place in hell for business owners who inflict Websense or any other method of censoring content on their own employees. If you don't trust me to use it, don't give me a computer, or an internet connection.

I work in information security for a company that uses content filtering, let me explain the standard reasoning (with the disclaimer that I don't speak for my company or yours, etc).

Your work computer and Internet access is governed by a policy that all employees have to sign. Among other things, this policy says that your time at work is supposed to be used doing work-related things. The only way to enforce this policy is to filter out things that are not business-related. This policy at many companies is usually pretty lax and ad-hoc, really only blocking categories of sites, not individual sites themselves. The categories usually include pornography/extreme content, games, etc.

Other categories are blocked due to the fear of data leakage. Google Docs/Dropbox is common for this. The last thing you want your employees doing is putting sensitive information onto the Internet where competitors or ill-wishers can view them. The goal here is to make it more difficult to share, not impossible (knowing that email/removable media is still an option).

We want you to do your work. We understand there are times when you need Internet access. But no, we don't trust you, because you're on Hacker News right now (as am I). If the world were a better place, we could trust the security of the company to the users/employees. You and I both know this isn't true. While you're at work, your company owns your time under the terms of your contract. It's not censorship because private organizations have no responsibility to ensure your freedoms.

TL;DR try complaining to your CIO that you can't get to iheartchaos.com. S/He'll tell you to get back to work.

Post reply on HN