How to do quickest
- To: mathgroup at smc.vnet.net
- Subject: [mg73035] How to do quickest
- From: Artur <grafix at csl.pl>
- Date: Tue, 30 Jan 2007 07:00:19 -0500 (EST)
- References: <epf93g$buf$1@smc.vnet.net> <200701290939.EAA12706@smc.vnet.net>
Probably these procedure isn't possible to do much quicker because limit is time of single PrimeQ checking but mayby somebody is able do some quickest (these procedure looking for prime numbers of the form 1+4+4^2+4^3+...4^x (mayby number 5 is only one such number ???): a = {}; k = 0; Timing[Do[k = k + 4^x; If[ PrimeQ[k], Print[k]; AppendTo[a, k]], {x, 0, 10000}]; a] PrimeQ is relatively quick but working only up to upper limit, later is necessary uses NumberTheory packagae and much more slowest procedures. BEST WISHES ARTUR
- Follow-Ups:
- Re: How to do quickest
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: How to do quickest
- References:
- Re: NDSolve -- initial conditions
- From: Jens-Peer Kuska <kuska@informatik.uni-leipzig.de>
- Re: NDSolve -- initial conditions