![]() |
|
|
#1112 | |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
Quote:
|
|
|
|
|
|
|
#1113 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
|
|
|
|
|
|
|
#1114 |
|
Aug 2006
3·1,993 Posts |
That wouldn't work. First, you can't assign to a^2 (in C terminology, it's an rvalue not an lvalue; in assembly terms (though not strictly relevant here!), it's not memory-mapped). Second, you can't fix more than one member -- once you pick one, you fix the values for all of them.
Last fiddled with by CRGreathouse on 2010-08-29 at 20:39 |
|
|
|
|
|
#1115 |
|
Mar 2006
Germany
22·727 Posts |
|
|
|
|
|
|
#1116 |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Code:
1546750398064958524633425292455441988676752527730835687139862311217981986247572619886186890734016949799686352443760408934653066300968034776190705901570570913201114184380563243205276690363368824249952639567750758594330067937015662345505149388718977581056000000000000000000000000000000000000000000000001 Last fiddled with by 3.14159 on 2010-08-29 at 20:43 |
|
|
|
|
|
#1117 |
|
Aug 2006
10111010110112 Posts |
As long as you're working below 4e9 or 1e10 or so (depending on your platform), it's *far* more efficient to use forprime.
Further, for any number for which it is viable to generate all members up to, it's most efficient to sieve in some form. You could be talking about running overnight vs. taking a week. Of course this would take custom code! I happen to have this: prototype code that lets me loop over primes up to primelimit^2 rather than primelimit. I'm not going to release it at this time: it's buggy near the endpoints and I need to fix that, plus it requires a dynamic installation of Pari so doesn't work for people who only have the Windows binary. |
|
|
|
|
|
#1118 | |
|
May 2010
Prime hunting commission.
168010 Posts |
Quote:
|
|
|
|
|
|
|
#1119 |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Well, one may already exist in form of a sieve for Generalized Fermat numbers. All that is required is sieving for n^2 + 1 and n^4 + 1
Last fiddled with by 3.14159 on 2010-08-29 at 22:14 |
|
|
|
|
|
#1120 |
|
Aug 2006
3·1,993 Posts |
|
|
|
|
|
|
#1121 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#1122 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |