How accurately must I compute the twin prime constant to get the twin prime density?











up vote
1
down vote

favorite












Let $pi _{2}(x)$ denote the number of primes $pleq x$ such that $p+2$ is also prime. Hardy and Littlewood conjectured that



$$
{displaystyle pi _{2}(x)sim 2C_{2}{frac {x}{(ln x)^{2}}}sim 2C_{2}int _{2}^{x}{dt over (ln t)^{2}}},
$$



where



$$
{displaystyle C_{2}=prod _{textstyle {p;{rm {prime}} atop pgeq 3}}left(1-{frac {1}{(p-1)^{2}}}right)approx 0.660161815846869573927812110014dots }.
$$



I want to numerically study this density, so I implemented some C++ code that computes the above value for $pi_2(x)$. However, before launching any computations I want to make sure that I set everything up correctly. In particular, I am unsure about what precision I should use for $C_2$, i.e., the twin-prime constant, in function of my input $x$.



In other words, how many primes should I include within the product for $C_2$ so that I get the correct expected conjectured density for $pi_2(x)$? For example, if I want to calculate the conjectured density for $pi_2(10^5)$, should I include all primes $leq 10^5$ in the product for $C_2$?










share|cite|improve this question















This question has an open bounty worth +50
reputation from Klangen ending in 6 days.


This question has not received enough attention.
















  • The number of digits of $C_2$ given in the problem will be more than accurate enough for any $x$ you can reach numerically. Sub-leading terms in the asymptotic form are going to contribute much earlier than the 30th significant figure.
    – mjqxxxx
    yesterday










  • @mjqxxxx Thank you for your comment. Can you give a more detailed answer, in terms of $x$? For instance, how many primes should I consider in the product for $pi_2(10^x)$?
    – Klangen
    yesterday















up vote
1
down vote

favorite












Let $pi _{2}(x)$ denote the number of primes $pleq x$ such that $p+2$ is also prime. Hardy and Littlewood conjectured that



$$
{displaystyle pi _{2}(x)sim 2C_{2}{frac {x}{(ln x)^{2}}}sim 2C_{2}int _{2}^{x}{dt over (ln t)^{2}}},
$$



where



$$
{displaystyle C_{2}=prod _{textstyle {p;{rm {prime}} atop pgeq 3}}left(1-{frac {1}{(p-1)^{2}}}right)approx 0.660161815846869573927812110014dots }.
$$



I want to numerically study this density, so I implemented some C++ code that computes the above value for $pi_2(x)$. However, before launching any computations I want to make sure that I set everything up correctly. In particular, I am unsure about what precision I should use for $C_2$, i.e., the twin-prime constant, in function of my input $x$.



In other words, how many primes should I include within the product for $C_2$ so that I get the correct expected conjectured density for $pi_2(x)$? For example, if I want to calculate the conjectured density for $pi_2(10^5)$, should I include all primes $leq 10^5$ in the product for $C_2$?










share|cite|improve this question















This question has an open bounty worth +50
reputation from Klangen ending in 6 days.


This question has not received enough attention.
















  • The number of digits of $C_2$ given in the problem will be more than accurate enough for any $x$ you can reach numerically. Sub-leading terms in the asymptotic form are going to contribute much earlier than the 30th significant figure.
    – mjqxxxx
    yesterday










  • @mjqxxxx Thank you for your comment. Can you give a more detailed answer, in terms of $x$? For instance, how many primes should I consider in the product for $pi_2(10^x)$?
    – Klangen
    yesterday













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Let $pi _{2}(x)$ denote the number of primes $pleq x$ such that $p+2$ is also prime. Hardy and Littlewood conjectured that



$$
{displaystyle pi _{2}(x)sim 2C_{2}{frac {x}{(ln x)^{2}}}sim 2C_{2}int _{2}^{x}{dt over (ln t)^{2}}},
$$



where



$$
{displaystyle C_{2}=prod _{textstyle {p;{rm {prime}} atop pgeq 3}}left(1-{frac {1}{(p-1)^{2}}}right)approx 0.660161815846869573927812110014dots }.
$$



I want to numerically study this density, so I implemented some C++ code that computes the above value for $pi_2(x)$. However, before launching any computations I want to make sure that I set everything up correctly. In particular, I am unsure about what precision I should use for $C_2$, i.e., the twin-prime constant, in function of my input $x$.



In other words, how many primes should I include within the product for $C_2$ so that I get the correct expected conjectured density for $pi_2(x)$? For example, if I want to calculate the conjectured density for $pi_2(10^5)$, should I include all primes $leq 10^5$ in the product for $C_2$?










share|cite|improve this question













Let $pi _{2}(x)$ denote the number of primes $pleq x$ such that $p+2$ is also prime. Hardy and Littlewood conjectured that



$$
{displaystyle pi _{2}(x)sim 2C_{2}{frac {x}{(ln x)^{2}}}sim 2C_{2}int _{2}^{x}{dt over (ln t)^{2}}},
$$



where



$$
{displaystyle C_{2}=prod _{textstyle {p;{rm {prime}} atop pgeq 3}}left(1-{frac {1}{(p-1)^{2}}}right)approx 0.660161815846869573927812110014dots }.
$$



I want to numerically study this density, so I implemented some C++ code that computes the above value for $pi_2(x)$. However, before launching any computations I want to make sure that I set everything up correctly. In particular, I am unsure about what precision I should use for $C_2$, i.e., the twin-prime constant, in function of my input $x$.



In other words, how many primes should I include within the product for $C_2$ so that I get the correct expected conjectured density for $pi_2(x)$? For example, if I want to calculate the conjectured density for $pi_2(10^5)$, should I include all primes $leq 10^5$ in the product for $C_2$?







asymptotics computational-mathematics prime-twins






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 1 at 12:41









Klangen

1,25811129




1,25811129






This question has an open bounty worth +50
reputation from Klangen ending in 6 days.


This question has not received enough attention.








This question has an open bounty worth +50
reputation from Klangen ending in 6 days.


This question has not received enough attention.














  • The number of digits of $C_2$ given in the problem will be more than accurate enough for any $x$ you can reach numerically. Sub-leading terms in the asymptotic form are going to contribute much earlier than the 30th significant figure.
    – mjqxxxx
    yesterday










  • @mjqxxxx Thank you for your comment. Can you give a more detailed answer, in terms of $x$? For instance, how many primes should I consider in the product for $pi_2(10^x)$?
    – Klangen
    yesterday


















  • The number of digits of $C_2$ given in the problem will be more than accurate enough for any $x$ you can reach numerically. Sub-leading terms in the asymptotic form are going to contribute much earlier than the 30th significant figure.
    – mjqxxxx
    yesterday










  • @mjqxxxx Thank you for your comment. Can you give a more detailed answer, in terms of $x$? For instance, how many primes should I consider in the product for $pi_2(10^x)$?
    – Klangen
    yesterday
















The number of digits of $C_2$ given in the problem will be more than accurate enough for any $x$ you can reach numerically. Sub-leading terms in the asymptotic form are going to contribute much earlier than the 30th significant figure.
– mjqxxxx
yesterday




The number of digits of $C_2$ given in the problem will be more than accurate enough for any $x$ you can reach numerically. Sub-leading terms in the asymptotic form are going to contribute much earlier than the 30th significant figure.
– mjqxxxx
yesterday












@mjqxxxx Thank you for your comment. Can you give a more detailed answer, in terms of $x$? For instance, how many primes should I consider in the product for $pi_2(10^x)$?
– Klangen
yesterday




@mjqxxxx Thank you for your comment. Can you give a more detailed answer, in terms of $x$? For instance, how many primes should I consider in the product for $pi_2(10^x)$?
– Klangen
yesterday















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021283%2fhow-accurately-must-i-compute-the-twin-prime-constant-to-get-the-twin-prime-dens%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021283%2fhow-accurately-must-i-compute-the-twin-prime-constant-to-get-the-twin-prime-dens%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Måne

Storängen

VLT Carioca