mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2013-07-08, 04:31   #1
devarajkandadai
 
devarajkandadai's Avatar
 
May 2004

22·79 Posts
Default Program requested

In pari {p(n)=isprime(x^2+1)} will generate a number of primes indicated by 1 in a given interval. How do we count these? Request for a counting program.

Example what is the number of primes generated in (n=10,111)?

A.K. Devaraj
devarajkandadai is offline   Reply With Quote
Old 2013-07-08, 04:38   #2
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

2×29×103 Posts
Default

I think what you're asking for is
Code:
sum(n=10,111,isprime(n^2+1))
which says that there are 16 primes of the form n^2 + 1 with 10 <= n <= 111.
CRGreathouse is offline   Reply With Quote
Old 2013-07-08, 09:29   #3
devarajkandadai
 
devarajkandadai's Avatar
 
May 2004

1001111002 Posts
Default Request for a program

Quote:
Originally Posted by CRGreathouse View Post
I think what you're asking for is
Code:
sum(n=10,111,isprime(n^2+1))
which says that there are 16 primes of the form n^2 + 1 with 10 <= n <= 111.
Tks. Will try it.

A.K. Devaraj
devarajkandadai is offline   Reply With Quote
Old 2013-07-08, 12:01   #4
devarajkandadai
 
devarajkandadai's Avatar
 
May 2004

22·79 Posts
Default

Quote:
Originally Posted by devarajkandadai View Post
Tks. Will try it.

A.K. Devaraj
Tks once again- this is very useful!
devarajkandadai is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prime95 defaults - your input requested Prime95 PrimeNet 25 2016-03-25 19:32
Rigour Requested davieddy Math 0 2013-04-25 11:47
Search engine feedback requested. Xyzzy Forum Feedback 2 2007-05-28 04:22
ecm benchmarks requested for Stage 1 and 2 jasong GMP-ECM 0 2007-04-19 02:25
Iterations requested for factoring... guido72 Software 16 2002-09-09 21:12

All times are UTC. The time now is 14:57.

Sun Mar 7 14:57:17 UTC 2021 up 94 days, 11:08, 0 users, load averages: 1.93, 1.82, 1.66

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.