Is it possible to find function that describes irrational things?

Essentially the same thing as p_{n+1}-p_n, but using your expression.In summary, the conversation discusses the concept of a changing function that can be used to describe an irrational number, specifically the decimals of pi. The idea of a function that changes in a patterned way is introduced and examples are given, such as the Fibonacci sequence. The conversation also delves into the possibility of using floor, ceiling, or rounding functions to describe an irrational number. The concept of a prime counting function, which counts the number of primes less than or equal to a given number, is also brought up. It is mentioned that such a function cannot be defined using a non-constant polynomial, but it is
  • #1
epkid08
264
1
i.e. decimals of an irrational number, pi(n), etc.

The function itself, f(n), can change with n, as long as it changes in a patterned way.

This seems like a straight foreword question, either you can for all, or you can't for all. A simple example of a changing function would be the Fibonacci sequence.

Also, do you think that a function such as this(one that describes an irrational thing), could have to do with a floor, ceiling, or some type of rounding, function?
 
Physics news on Phys.org
  • #2
Perhaps you need to give more detail about what you want.

"f(n)= the nth decimal place of [itex]\pi[/itex]" is a perfectly good function that gives "decimals of an irrational number".
 
  • #3
HallsofIvy said:
Perhaps you need to give more detail about what you want.

"f(n)= the nth decimal place of [itex]\pi[/itex]" is a perfectly good function that gives "decimals of an irrational number".

Can you define f(n) using n and/or [tex]\pi[/tex] in such a way where the change in f(n) is considered patterned?

Edit: Basically what I'm asking is, is it possible to make prime a counting function, where (if [tex]\pi_k(n)[/tex] changes with [tex]n_k[/tex]) [tex]\pi_k(n)[/tex] is patterned.
 
Last edited:
  • #4
It's really not clear what you're asking for. But I can answer one specific thing: there are straightforward formulas for the n-th decimal digit of a real number, such as

[tex]\left\lfloor 10^{-n} x - 10 \left\lfloor 10^{-n-1} x \right\rfloor
\right\rfloor.[/tex]
 
  • #5
Hurkyl said:
It's really not clear what you're asking for. But I can answer one specific thing: there are straightforward formulas for the n-th decimal digit of a real number, such as

[tex]\left\lfloor 10^{-n} x - 10 \left\lfloor 10^{-n-1} x \right\rfloor
\right\rfloor.[/tex]

Here is my question the simplest way I can put it:

Is there a way to define [tex]\pi(n)[/tex](prime counting function), for all n?
 
  • #6
epkid08 said:
Is there a way to define [tex]\pi(n)[/tex](prime counting function), for all n?

"[itex]\pi(n)[/itex] is the number of primes less than or equal to n."

Are you asking if there is a closed-form expression for this? In that case, the answer is still yes; MathWorld and Wikipedia both have pages on this (something like 'prime formulas').
 
  • #7
It is known that no non-constant polynomial function P(n) exists that evaluates to a prime number for all integers n. The proof is simple: Suppose such a polynomial existed. Then P(1) would evaluate to a prime p, so P(1) \equiv 0 \pmod p. But for any k, P(1+kp) \equiv 0 \pmod p also, so P(1 + kp) cannot also be prime (as it would be divisible by p) unless it were p itself, but the only way P(1 + kp) = P(1) for all k is if the polynomial function is constant.

I got this from wikipedia. This is sort of the question I was asking. I wondering whether a P(n) function exists for all n. It clearly states no, which is what thought for a non-constant polynomial function, but what about a function that constantly changes to a pattern? A poor example:

[tex]P_1=\sum^n_{k=0}(n_{n-k})*((2n-1)+P_{n-1})mod(\lfloor tan^n(\frac{2\pi}{2\pi+n})\rfloor) [/tex]

[tex]P_2=\sum^n_{k=0}(n_{n-k})*((2n-1)+P_{n-1})mod(\lfloor tan^n(\frac{2\pi}{2\pi+n})\rfloor) + \lfloor \prod^{P_{n-1}}_{k=n}(ln(k))\rfloor[/tex]

[tex]P_3=\sum^n_{k=0}(n_{n-k})*((2n-1)+P_{n-1})mod(\lfloor tan^n(\frac{2\pi}{2\pi+n})\rfloor) + \lfloor \prod^{P_{n-1}}_{k=n}(ln(k))\rfloor - \lfloor \prod^{P_{n-2}}_{k=n}(ln(k))\rfloor[/tex]

This function probably makes no sense at all, it was just an example.
 
  • #8
epkid08 said:
I got this from wikipedia. This is sort of the question I was asking. I wondering whether a P(n) function exists for all n. It clearly states no, which is what thought for a non-constant polynomial function, but what about a function that constantly changes to a pattern?

Such functions certainly exist, they're just not polynomials (unless they're constant). An example would be the function P_n, which sends a positive integer n to the nth prime.
 
  • #9
Here, I sense a communication problem. When you say "function", I think you mean to say "closed-form expression". Is that right?
 
  • #10
The integral of 4/(1+t^2) with respect to T from 0 to X describes pi if X = 1.

[tex]\pi\ = \int_{0}^1\frac{4}{1 + t^2} dt[/tex]
 
  • #11
Alex6200 said:
The integral of 4/(1+t^2) with respect to T from 0 to X describes pi if X = 1.

[tex]\pi\ = \int_{0}^1\frac{4}{1 + t^2} dt[/tex]

This is only true if you setup a constraint i.e. if x=1.

Here's a question, can an expression of any kind, describe the change from any prime to the next prime?
 
  • #12
You have so many undefined terms it is impossible to know where to begin.

What does 'the change from prime to prime' even mean? As has been pointed out before, functions can be defined that describe *anything*, the only question is whether that function has a 'nice' form, or can be calculated quickly. But you'd need to define what you consider 'nice' and 'quickly' to mean.
 
  • #13
I think this is what I was looking for:
[tex]p_n = 1 + \sum_{m=1}^{2^n} \left\lfloor \left\lfloor { n \over 1 + \(\sum_{j=2}^m \left\lfloor {(j-1)! + 1 \over j} - \left\lfloor{(j-1)! \over j}\right\rfloor \right\rfloor) } \right\rfloor^{1 \over n} \right\rfloor[/tex]

An expression in the form [tex] P_n=f(N_p)[/tex], where everything is defined.
 
  • #14
epkid08 said:
This is only true if you setup a constraint i.e. if x=1.

Well, yes. But that IS a function that describes an irrational number in a non-circular fashion (i.e, a function f(x) = [tex] \pi\ =\ 3.14159265358979323 [/tex] would be circular)

Here's a question, can an expression of any kind, describe the change from any prime to the next prime?

Ummm... I don't think so. I mean there are obviously functions that one could write that could do that. But since that would involve using if-then statements I don't know if it would qualify as an expression.
 
  • #15
epkid08 said:
Here's a question, can an expression of any kind, describe the change from any prime to the next prime?

Of course. One expression would be "the difference between the (n+1)th prime and the nth prime". Another would be [itex]p_{n+1}-p_n.[/itex] Another, using your expression above, would be

[tex]\sum_{m=1}^{2^{n+1}} \left\lfloor \left\lfloor { {n+1} \over 1 + \(\sum_{j=2}^m \left\lfloor {(j-1)! + 1 \over j} - \left\lfloor{(j-1)! \over j}\right\rfloor \right\rfloor) } \right\rfloor^{1 \over {n+1}} \right\rfloor - \sum_{m=1}^{2^n} \left\lfloor \left\lfloor { n \over 1 + \(\sum_{j=2}^m \left\lfloor {(j-1)! + 1 \over j} - \left\lfloor{(j-1)! \over j}\right\rfloor \right\rfloor) } \right\rfloor^{1 \over n} \right\rfloor[/tex]
 
  • #16
Let's standardize our terminology here:
  • Expression: any well-formed mathematical statement. Examples: x = y, y + 3, "the set of numbers one greater than a prime", and any of the below.
  • Function: an expression which relates any x from the function's domain to exactly one y from the function's codomain. Examples: the function from the set of people on Earth to the set {Jan 1, Jan 2, Jan 3, ..., Dec 30, Dec 31} defined by f(x) = the birthday of x, or any of the closed-form functions below.
  • Closed-form expression: an expression which can be written with a particular subset of the symbols, say {+, -, *, /, ^, %, sum, !, 0, 1, floor, sin} plus function variables. Examples: 7! or any of the closed-form functions below.
  • Closed-form function: a closed-form expression which is a function. Examples: f(x) = sin (x), f(n) = [itex]\lfloor\sqrt n\rfloor.[/itex]
 
  • #17
CRGreathouse said:
Let's standardize our terminology here:
  • Expression: any well-formed mathematical statement. Examples: x = y, y + 3, "the set of numbers one greater than a prime", and any of the below.
  • Function: an expression which relates any x from the function's domain to exactly one y from the function's codomain. Examples: the function from the set of people on Earth to the set {Jan 1, Jan 2, Jan 3, ..., Dec 30, Dec 31} defined by f(x) = the birthday of x, or any of the closed-form functions below.
  • Closed-form expression: an expression which can be written with a particular subset of the symbols, say {+, -, *, /, ^, %, sum, !, 0, 1, floor, sin} plus function variables. Examples: 7! or any of the closed-form functions below.
  • Closed-form function: a closed-form expression which is a function. Examples: f(x) = sin (x), f(n) = [itex]\lfloor\sqrt n\rfloor.[/itex]

I was under the impression that there existed no type of function or expression that took the form of [tex]P_n=f(N_p)[/tex]. I originally assumed this because 1) I've been told numerous times that there wasn't (probably told that there was no function), and 2) everybody makes a huge deal about the distribution of primes and finding an easy way to find all of the primes, and so I thought there existed no expression.

Here's a final question, why, if we already have an expression in the form, [tex]P_n=f(N_p)[/tex], are people still searching for high prime numbers?

[tex]p_n = 1 + \sum_{m=1}^{2^n} \left\lfloor \left\lfloor { n \over 1 + \(\sum_{j=2}^m \left\lfloor {(j-1)! + 1 \over j} - \left\lfloor{(j-1)! \over j}\right\rfloor \right\rfloor } \right\rfloor^{1 \over n} \right\rfloor[/tex]

Isn't this expression good enough to find any/all of the primes?
 
  • #18
epkid08 said:
I was under the impression that there existed no type of function or expression that took the form of [tex]P_n=f(N_p)[/tex]. I originally assumed this because 1) I've been told numerous times that there wasn't (probably told that there was no function)

The statement "There is no function that maps a positive integer n to the nth prime" is wrong. The statement "There is no closed-form expression that maps a positive integer n to the nth prime" is wrong, assuming closed-form expressions can use addition, subtraction, multiplication, division, exponents, factorials, indexed sums, and the floor function.

I'm not being condescending at all with the following statement:
Anyone who says that there is no formula for the primes doesn't know what they're talking about. There is no sensible interpretation under which that is true.

epkid08 said:
everybody makes a huge deal about the distribution of primes and finding an easy way to find all of the primes, and so I thought there existed no expression.

Yes, the formula I posted takes something like 2 * 4n factorial calculations, which takes a really long time for n greater than, say, 50. But calculating the difference between the 101st prime and the 100th prime, 547 - 541 = 6, is very easy. So improving on this closed-form expression with efficient algorithms is important.

epkid08 said:
Here's a final question, why, if we already have an expression in the form, [tex]P_n=f(N_p)[/tex], are people still searching for high prime numbers?

Using the formula from post #13 to calculate that p_10 = 29 would take 1024 steps through the main loop. Each pass through the main loop runs the inner loop up to 1023 times. Each pass through the inner loop requires the calculation of two factorials, which may be as large as 1023! > 102336. In total, over a million factorials are computed, most of which are huge.

But you can instead check each number from 1 to 30 for divisibility by 2, 3, and 5 to determine that 29 is the 10th prime.

This method, millions of times faster than the formula from post #13, is called "trial division" and is considered too slow to test the primality of any but the smallest numbers.

epkid08 said:
Isn't this expression good enough to find any/all of the primes?

Given enough time that expression will (presumably) find any prime desired. But using a dual-core 1 THz computer, finding the 100th prime with that method would take longer than the life of the universe.
 
  • #19
Here's a time comparison for finding the kth prime.

If factorials are calculated directly, the formula from post #13 takes [itex]O(8^{k+\varepsilon})[/itex] multiplications,with yet higher bit complexity.

Trial division takes [itex]O(\sqrt n)[/itex] time for each number, so [itex]O(k\sqrt k)=O(n^{1.5})[/itex] time overall. (Actually it's not quite that bad, since most will exit early.)

APR takes [itex]O((\log n)^{\log\log\log n})[/itex] and AKS takes [itex]O((\log n)^{12}[/itex] for each prime, so the test with either would take [itex]O(k^{1+\varepsilon})[/itex] total steps. (Efficient versions of AKS exist which take substantially less time, but it's not relevant here.)

The real way to do the problem is with the sieve of Eratosthenes, which takes time [itex]O(k\log k\log\log k).[/itex] It might not seem like much of an improvement on the above, but it's far simpler and millions of times faster. (No one would use the above for this purpose; that would be silly.)

The sieve of Atkin, though not as simple as the above, is faster at [itex]O(k/\log\log k).[/itex] This is the first sublinear algorithm for the problem from the list so far.

Meissel's method counts primes up to a given bound. It takes [itex]O(k/(\log k)^3)[/itex] time, and once you have that it takes negligible effort to find the prime needed with a small sieve and binary search.

Mapes' method, an improved way to count primes, takes only [itex]O(k^{0.7})[/itex] and so is the first method on this list that finishes in time o(k).

The Lagarias-Miller-Odlyzko method is the current best, taking [itex]O(k^{2/3}).[/itex]
 
  • #20
yes, there are formulas for many of these functions. Mathworld has a lot of them on their site, as well as many more number theoretic formulae.
 
  • #21
CRGreathouse said:
Mapes' method, an improved way to count primes, takes only [itex]O(k^{0.7})[/itex] and so is the first method on this list that finishes in time o(k).

That's supposed to be [itex]O(k^{1-\varepsilon})[/itex] for some [itex]\varepsilon,[/itex] by the way.
 

1. Can irrational things be described by a single function?

No, irrational things cannot be described by a single function. Irrational things, by definition, cannot be expressed as a ratio of two integers, which is necessary for a function.

2. Is it possible to find a pattern in irrational things?

Yes, it is possible to find patterns in irrational things. Although they cannot be described by a single function, irrational things often exhibit repeating decimals or have certain mathematical relationships with other irrational numbers.

3. Can we use calculus to find a function for irrational things?

No, calculus cannot be used to find a function for irrational things. Calculus relies on using algebraic equations and limits, which cannot be applied to irrational numbers.

4. Are there any real-world applications for finding functions that describe irrational things?

Yes, there are real-world applications for finding functions that describe irrational things. For example, in physics and engineering, irrational numbers such as pi and the square root of 2 are used in calculations and models for various phenomena.

5. How do mathematicians study irrational things?

Mathematicians study irrational things using various mathematical tools and techniques, such as number theory, geometry, and algebra. They also use computer algorithms and programming to explore and analyze the properties of irrational numbers.

Similar threads

  • Linear and Abstract Algebra
Replies
8
Views
1K
Replies
25
Views
3K
Replies
4
Views
384
  • Calculus and Beyond Homework Help
2
Replies
36
Views
3K
Replies
5
Views
1K
  • Calculus
Replies
5
Views
2K
  • Linear and Abstract Algebra
Replies
4
Views
3K
  • General Math
Replies
4
Views
1K
Replies
19
Views
2K
Replies
11
Views
1K
Back
Top