- I was doing some thinking the other day, and ran into some neat stuff: What percentage of all integers are even, or divisible by 2? At first, I thought it would be an easy answer... 50%, which seems obvious, but actually, after I ran the numbers, it turns out to be a series that converges on 50%, but never actually reaches it. The result is always slightly higher or lower than 50%.

I have several questions about this that someone can probably answer :)

So I decided, what about the percentage of Infinity that is divisible by 3, and only 3, not 2 as well (whats the terminology for that?)

So then I find out that every prime number represents a percentage of infinity that is solely divisible by that number alone; 2 has 50%, 3 has 16.6667% , 5 has 3.333%, 7 has .4762% and so on. There is a logical progression to these "chunks" of infinity, and I was wondering what the series was called, or where I could find more information on it?

It goes like this:

1/2

(1/3)/2

((1/5)/3)/2

(((1/7)/5)/3)/2

((((1/11)/7)/5)/3)/2

It appears that the sum of these percentages of infinity converges to something less than 100%... if so, what makes up the rest of the numbers?

It also appears that a larger percent of infinity is divisible by 11 and 13 than 7, although this may be a mistake on my part. Weird, to say the least :)

How would I write an equation that describes this series? I have an excel spreadsheet which does the job for me, but I'd like to see it in its mathematical form.

For 2, its easy, because I don't have to remove any concurrent factors:

Sum the number of numbers from 1 to n that divide evenly by 2. Divide the resulting sum by n (representing the average, or percentage).

For 3, it would go something like this:

Sum the number of numbers from 1 to n that divide evenly by 3, and not 2. Divide the resulting sum by n.

For 5:(incidentally, all numbers divisible by 4 are contained within the domain of numbers divisible by 2, so they arent counted as a unique segment of infinity.)

Sum the number of numbers from 1 to n that divide evenly by 5, and not 3, and not 2. Divide the resulting sum by n.

... and so on? Is there an easy to way to represent that mathematically?

The graph for 3, n=100, is interesting, because it creates a bouncy ball type look to the graph. Interesting, to me anyway. I think for every number >2 there are "bounces", but it is most apparent in the 3 series.

Thanks for any help!

---------------------------------

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.

[Non-text portions of this message have been removed] - Alec Smart wrote:
> I'm working with Python, currently... is there a specific programming

You'll probably note, if you follow the discussions in this group,

> language that is designed for math, or a package thats not as

> expensive as Mathematica? Pythons great for simple things, but not as

> optimized as I'd like it to be, and C is a pain in the butt for me.

that a large number of participants use the free PARI/GP package for

number theory calculations. Their speed and simplicity is often very

impressive. GP is a unique programming language that provides an

interface to the PARI C library of functions.

http://en.wikipedia.org/wiki/PARI/GP

It is usually compiled with the very fast GMP multi-precision library

which makes most of its calculations with big numbers quite competitive

with the fastest mathematical packages out there. It has a wide variety

of algorithms already implemented efficiently, and should perform as

well or better as something that most programmers could implement in

about any language.

It's not designed to be as much of a general-purpose language as

Python, (Turing-completeness aside,) and you may find some things (e.g.

processing text) much more difficult to do in GP.

As an interesting data point, you might note that in the Project

Euler programming competition, there are a small number of users who

claim to use PARI/GP as their language of choice for solving the puzzle,

but their average number of puzzles solved is very high:

http://projecteuler.net/index.php?section=statistics

--

Alan Eliasen | "Furious activity is no substitute

eliasen@... | for understanding."

http://futureboy.us/ | --H.H. Williams