How to finds primes $p$ with the property that both $10p^2+9$ and $8p^2-9$ are also primes using Wolfram Alpha?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I want to know the number of primes $p$ that satisfies the condition that
$10p^2 + 9$
and
$8p^2 - 9$
are both primes, for primes $p$ only.
How can I do it using Wolfram Alpha (or any other online math software)?
polynomials prime-numbers wolfram-alpha
add a comment |Â
up vote
1
down vote
favorite
I want to know the number of primes $p$ that satisfies the condition that
$10p^2 + 9$
and
$8p^2 - 9$
are both primes, for primes $p$ only.
How can I do it using Wolfram Alpha (or any other online math software)?
polynomials prime-numbers wolfram-alpha
1
There is a separate site for Mathematica, but if you want to ask about any other maths software (such as Maple), this is the right place.
â Toby Mak
Aug 18 at 2:25
There probably are an infinite number of primes that satisfy this...
â Rushabh Mehta
Aug 18 at 2:30
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to know the number of primes $p$ that satisfies the condition that
$10p^2 + 9$
and
$8p^2 - 9$
are both primes, for primes $p$ only.
How can I do it using Wolfram Alpha (or any other online math software)?
polynomials prime-numbers wolfram-alpha
I want to know the number of primes $p$ that satisfies the condition that
$10p^2 + 9$
and
$8p^2 - 9$
are both primes, for primes $p$ only.
How can I do it using Wolfram Alpha (or any other online math software)?
polynomials prime-numbers wolfram-alpha
edited Aug 18 at 7:34
Asaf Karagilaâ¦
293k31407735
293k31407735
asked Aug 18 at 2:19
John Finkelstein
656
656
1
There is a separate site for Mathematica, but if you want to ask about any other maths software (such as Maple), this is the right place.
â Toby Mak
Aug 18 at 2:25
There probably are an infinite number of primes that satisfy this...
â Rushabh Mehta
Aug 18 at 2:30
add a comment |Â
1
There is a separate site for Mathematica, but if you want to ask about any other maths software (such as Maple), this is the right place.
â Toby Mak
Aug 18 at 2:25
There probably are an infinite number of primes that satisfy this...
â Rushabh Mehta
Aug 18 at 2:30
1
1
There is a separate site for Mathematica, but if you want to ask about any other maths software (such as Maple), this is the right place.
â Toby Mak
Aug 18 at 2:25
There is a separate site for Mathematica, but if you want to ask about any other maths software (such as Maple), this is the right place.
â Toby Mak
Aug 18 at 2:25
There probably are an infinite number of primes that satisfy this...
â Rushabh Mehta
Aug 18 at 2:30
There probably are an infinite number of primes that satisfy this...
â Rushabh Mehta
Aug 18 at 2:30
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
Using Wolfram Alpha/Mathematica, this is what I have so far:
10 * Prime[n]^2 + 9
calculates your expression for the $n$th prime.
PrimeQ[ 10 * Prime[n]^2 + 9 ]
checks if that expression is prime.
Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n,20 ]
makes a table of if that expression is prime or not from $1$ to $20$.
I tried:
Count [ Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n, 20 ], True ]
to count how many 'True's there were from $1$ to $20$.
This works on Wolfram Cloud.
UnquoteTrue
, it's a built-in symbol.
â Robert Soupe
Aug 18 at 5:12
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
add a comment |Â
up vote
2
down vote
If you want to know how many such primes there are total, you're going to have to apply some good old fashioned human mathematical reasoning. Sometimes it's easy, sometimes it's hard.
e.g., how many primes consist of all 9s? That's easy, none in base 10. How many primes are of the form $2^p - 1$? That's hard. At least forty, but maybe not too many more than that.
But if you just want to know how many such of a given form there are in a reasonably small finite range, like, say, 1 to $10^20$, you can use Wolfram Alpha.
Many ways to skin a cat, Toby Mak has shown you a couple. Here's how I'd do it: first,
Select[10Prime[Range[100]]^2 + 9, PrimeQ]
Oops, I forgot you need to be a little more explicit in Wolfram Alpha:
Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]
First one should be 499, last one 2714419. Wrap that in Length
like so:
Length[Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]]
In Wolfram Mathematica you can also do Length[%]
, which I read in my mind as "length of previous."
Answer is 21. Meaning that among the first hundred primes $p$, 21 of them are such that $10p^2 + 9$ is also prime.
You can push Wolfram Alpha a little higher than that, but not as high as you can push Wolfram Mathematica. Unless maybe you have a paid Wolfram Alpha subscription.
EDIT: Yong Hao Ng correctly points out that the asker wants $10p^2 + 9$ and $8p^2 - 9$. And also that that can be easily accommodated with an AND, e.g., Length[Select[Prime[Range[100]], PrimeQ[10#^2 + 9] && PrimeQ[8#^2 - 9] &]]
.
1
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
Using Wolfram Alpha/Mathematica, this is what I have so far:
10 * Prime[n]^2 + 9
calculates your expression for the $n$th prime.
PrimeQ[ 10 * Prime[n]^2 + 9 ]
checks if that expression is prime.
Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n,20 ]
makes a table of if that expression is prime or not from $1$ to $20$.
I tried:
Count [ Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n, 20 ], True ]
to count how many 'True's there were from $1$ to $20$.
This works on Wolfram Cloud.
UnquoteTrue
, it's a built-in symbol.
â Robert Soupe
Aug 18 at 5:12
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
add a comment |Â
up vote
5
down vote
Using Wolfram Alpha/Mathematica, this is what I have so far:
10 * Prime[n]^2 + 9
calculates your expression for the $n$th prime.
PrimeQ[ 10 * Prime[n]^2 + 9 ]
checks if that expression is prime.
Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n,20 ]
makes a table of if that expression is prime or not from $1$ to $20$.
I tried:
Count [ Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n, 20 ], True ]
to count how many 'True's there were from $1$ to $20$.
This works on Wolfram Cloud.
UnquoteTrue
, it's a built-in symbol.
â Robert Soupe
Aug 18 at 5:12
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
add a comment |Â
up vote
5
down vote
up vote
5
down vote
Using Wolfram Alpha/Mathematica, this is what I have so far:
10 * Prime[n]^2 + 9
calculates your expression for the $n$th prime.
PrimeQ[ 10 * Prime[n]^2 + 9 ]
checks if that expression is prime.
Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n,20 ]
makes a table of if that expression is prime or not from $1$ to $20$.
I tried:
Count [ Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n, 20 ], True ]
to count how many 'True's there were from $1$ to $20$.
This works on Wolfram Cloud.
Using Wolfram Alpha/Mathematica, this is what I have so far:
10 * Prime[n]^2 + 9
calculates your expression for the $n$th prime.
PrimeQ[ 10 * Prime[n]^2 + 9 ]
checks if that expression is prime.
Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n,20 ]
makes a table of if that expression is prime or not from $1$ to $20$.
I tried:
Count [ Table[ PrimeQ[ 10 * Prime[n]^2 + 9 ], n, 20 ], True ]
to count how many 'True's there were from $1$ to $20$.
This works on Wolfram Cloud.
edited Aug 19 at 9:43
answered Aug 18 at 2:40
Toby Mak
2,7751925
2,7751925
UnquoteTrue
, it's a built-in symbol.
â Robert Soupe
Aug 18 at 5:12
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
add a comment |Â
UnquoteTrue
, it's a built-in symbol.
â Robert Soupe
Aug 18 at 5:12
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
Unquote
True
, it's a built-in symbol.â Robert Soupe
Aug 18 at 5:12
Unquote
True
, it's a built-in symbol.â Robert Soupe
Aug 18 at 5:12
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
@RobertSoupe Wolfram Alpha still doesn't give an answer.
â Toby Mak
Aug 18 at 9:17
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
Oh, yeah, sorry, I should have directed you to sandbox.open.wolframcloud.com instead.
â Robert Soupe
Aug 19 at 3:03
add a comment |Â
up vote
2
down vote
If you want to know how many such primes there are total, you're going to have to apply some good old fashioned human mathematical reasoning. Sometimes it's easy, sometimes it's hard.
e.g., how many primes consist of all 9s? That's easy, none in base 10. How many primes are of the form $2^p - 1$? That's hard. At least forty, but maybe not too many more than that.
But if you just want to know how many such of a given form there are in a reasonably small finite range, like, say, 1 to $10^20$, you can use Wolfram Alpha.
Many ways to skin a cat, Toby Mak has shown you a couple. Here's how I'd do it: first,
Select[10Prime[Range[100]]^2 + 9, PrimeQ]
Oops, I forgot you need to be a little more explicit in Wolfram Alpha:
Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]
First one should be 499, last one 2714419. Wrap that in Length
like so:
Length[Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]]
In Wolfram Mathematica you can also do Length[%]
, which I read in my mind as "length of previous."
Answer is 21. Meaning that among the first hundred primes $p$, 21 of them are such that $10p^2 + 9$ is also prime.
You can push Wolfram Alpha a little higher than that, but not as high as you can push Wolfram Mathematica. Unless maybe you have a paid Wolfram Alpha subscription.
EDIT: Yong Hao Ng correctly points out that the asker wants $10p^2 + 9$ and $8p^2 - 9$. And also that that can be easily accommodated with an AND, e.g., Length[Select[Prime[Range[100]], PrimeQ[10#^2 + 9] && PrimeQ[8#^2 - 9] &]]
.
1
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
add a comment |Â
up vote
2
down vote
If you want to know how many such primes there are total, you're going to have to apply some good old fashioned human mathematical reasoning. Sometimes it's easy, sometimes it's hard.
e.g., how many primes consist of all 9s? That's easy, none in base 10. How many primes are of the form $2^p - 1$? That's hard. At least forty, but maybe not too many more than that.
But if you just want to know how many such of a given form there are in a reasonably small finite range, like, say, 1 to $10^20$, you can use Wolfram Alpha.
Many ways to skin a cat, Toby Mak has shown you a couple. Here's how I'd do it: first,
Select[10Prime[Range[100]]^2 + 9, PrimeQ]
Oops, I forgot you need to be a little more explicit in Wolfram Alpha:
Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]
First one should be 499, last one 2714419. Wrap that in Length
like so:
Length[Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]]
In Wolfram Mathematica you can also do Length[%]
, which I read in my mind as "length of previous."
Answer is 21. Meaning that among the first hundred primes $p$, 21 of them are such that $10p^2 + 9$ is also prime.
You can push Wolfram Alpha a little higher than that, but not as high as you can push Wolfram Mathematica. Unless maybe you have a paid Wolfram Alpha subscription.
EDIT: Yong Hao Ng correctly points out that the asker wants $10p^2 + 9$ and $8p^2 - 9$. And also that that can be easily accommodated with an AND, e.g., Length[Select[Prime[Range[100]], PrimeQ[10#^2 + 9] && PrimeQ[8#^2 - 9] &]]
.
1
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
add a comment |Â
up vote
2
down vote
up vote
2
down vote
If you want to know how many such primes there are total, you're going to have to apply some good old fashioned human mathematical reasoning. Sometimes it's easy, sometimes it's hard.
e.g., how many primes consist of all 9s? That's easy, none in base 10. How many primes are of the form $2^p - 1$? That's hard. At least forty, but maybe not too many more than that.
But if you just want to know how many such of a given form there are in a reasonably small finite range, like, say, 1 to $10^20$, you can use Wolfram Alpha.
Many ways to skin a cat, Toby Mak has shown you a couple. Here's how I'd do it: first,
Select[10Prime[Range[100]]^2 + 9, PrimeQ]
Oops, I forgot you need to be a little more explicit in Wolfram Alpha:
Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]
First one should be 499, last one 2714419. Wrap that in Length
like so:
Length[Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]]
In Wolfram Mathematica you can also do Length[%]
, which I read in my mind as "length of previous."
Answer is 21. Meaning that among the first hundred primes $p$, 21 of them are such that $10p^2 + 9$ is also prime.
You can push Wolfram Alpha a little higher than that, but not as high as you can push Wolfram Mathematica. Unless maybe you have a paid Wolfram Alpha subscription.
EDIT: Yong Hao Ng correctly points out that the asker wants $10p^2 + 9$ and $8p^2 - 9$. And also that that can be easily accommodated with an AND, e.g., Length[Select[Prime[Range[100]], PrimeQ[10#^2 + 9] && PrimeQ[8#^2 - 9] &]]
.
If you want to know how many such primes there are total, you're going to have to apply some good old fashioned human mathematical reasoning. Sometimes it's easy, sometimes it's hard.
e.g., how many primes consist of all 9s? That's easy, none in base 10. How many primes are of the form $2^p - 1$? That's hard. At least forty, but maybe not too many more than that.
But if you just want to know how many such of a given form there are in a reasonably small finite range, like, say, 1 to $10^20$, you can use Wolfram Alpha.
Many ways to skin a cat, Toby Mak has shown you a couple. Here's how I'd do it: first,
Select[10Prime[Range[100]]^2 + 9, PrimeQ]
Oops, I forgot you need to be a little more explicit in Wolfram Alpha:
Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]
First one should be 499, last one 2714419. Wrap that in Length
like so:
Length[Select[10Prime[Range[100]]^2 + 9, PrimeQ[#] &]]
In Wolfram Mathematica you can also do Length[%]
, which I read in my mind as "length of previous."
Answer is 21. Meaning that among the first hundred primes $p$, 21 of them are such that $10p^2 + 9$ is also prime.
You can push Wolfram Alpha a little higher than that, but not as high as you can push Wolfram Mathematica. Unless maybe you have a paid Wolfram Alpha subscription.
EDIT: Yong Hao Ng correctly points out that the asker wants $10p^2 + 9$ and $8p^2 - 9$. And also that that can be easily accommodated with an AND, e.g., Length[Select[Prime[Range[100]], PrimeQ[10#^2 + 9] && PrimeQ[8#^2 - 9] &]]
.
edited Aug 18 at 8:37
answered Aug 18 at 5:33
Robert Soupe
10.1k21947
10.1k21947
1
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
add a comment |Â
1
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
1
1
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
A remark that for both conditions one could do Length[Select[Prime[Range[100]], PrimeQ[10#^2+9]&&PrimeQ[8#^2-9]&]]
â Yong Hao Ng
Aug 18 at 7:55
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2886354%2fhow-to-finds-primes-p-with-the-property-that-both-10p29-and-8p2-9-are-a%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
There is a separate site for Mathematica, but if you want to ask about any other maths software (such as Maple), this is the right place.
â Toby Mak
Aug 18 at 2:25
There probably are an infinite number of primes that satisfy this...
â Rushabh Mehta
Aug 18 at 2:30