This site is supported by donations to The OEIS Foundation.

Characteristic function of prime numbers

From OeisWiki
Jump to: navigation, search


This article page is a stub, please help by expanding it.


The characteristic function of prime numbers, which gives 1 if the number is a prime number and 0 otherwise, is defined as

where is the prime counting function.

It is also given by

where is the greatest common divisor of and , is the primorial of and is the Iverson bracket.

For example, , . (See A010051 for a listing going up to 100000.)


where is the characteristic function of prime numbers (A010051)
1  


    

<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 218, 237); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 223, 242); height:
| 100*1/1 |
px; bottom: 0; width: 3px; margin: 0 0 0 0; z-index: 0;"></div>
0  

Asymptotic probability

The characteristic function of prime numbers is equal to 1 with the slowly decreasing (converging towards 0) asymptotic probability

and equal to 0 with the slowly increasing (converging towards 1) asymptotic probability

Observe that if you set to = 2.718281828459..., giving a probability of being prime equal to 1, we have that both integers surrounding , i.e. 2 and 3, are prime!

The above limits imply that 0% of the integers are prime (100% of the integers are composite), yet the infinite series

where is the th prime, happens to diverge towards infinity!

See also