mersenneforum.org Program requested
 Register FAQ Search Today's Posts Mark Forums Read

 2013-07-08, 04:31 #1 devarajkandadai     May 2004 22·79 Posts 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
 2013-07-08, 04:38 #2 CRGreathouse     Aug 2006 2×29×103 Posts 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.
2013-07-08, 09:29   #3

May 2004

1001111002 Posts
Request for a program

Quote:
 Originally Posted by CRGreathouse 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

2013-07-08, 12:01   #4

May 2004

22·79 Posts

Quote:
 Originally Posted by devarajkandadai Tks. Will try it. A.K. Devaraj
Tks once again- this is very useful!

 Similar Threads Thread Thread Starter Forum Replies Last Post Prime95 PrimeNet 25 2016-03-25 19:32 davieddy Math 0 2013-04-25 11:47 Xyzzy Forum Feedback 2 2007-05-28 04:22 jasong GMP-ECM 0 2007-04-19 02:25 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