- --- Alec Smart <pvp4tw@...> wrote:
> I was doing some thinking the other day, and ran into some neat stuff: What

Research "Natural Density".

> 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%.

The limsup and liminf converge to 50%, so it's 50%.

Quite why you don't think the density on the sets {0,1} and {0,1,2,3}, ... is

not actually 50%, I don't know.

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

The concept you're alluding to seems to be numbers with a least prime factor

>

> 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?)

(lpf) of 3. You don't mean "only", or "solely" below.

> So then I find out that every prime number represents a percentage of

Does it need a name? They're the reciprocals of the promorials.

> 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:

Research slowly converging series. Don't be fooled by slow convergence.

> 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?

There is no rest of the numbers. This is most easily proved by showing that if

any number was left out, then it couldn't have any prime factors, which is an

absurdity.

> It also appears that a larger percent of infinity is divisible by 11 and 13

Mistake on your part.

> 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

Sum_{prime p=2}^{p_max} 1/p#

> 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:

You're confusing a procedure with a result. The mathematician generally only

> 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?

cares about the result. For each prime p it's fairly easy to write an

expression for the natural density of numbers whose lpf is p.

Phil

() ASCII ribbon campaign () Hopeless ribbon campaign

/\ against HTML mail /\ against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]

____________________________________________________________________________________

Sick sense of humor? Visit Yahoo! TV's

Comedy with an Edge to see what's on, when.

http://tv.yahoo.com/collections/222 - 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