Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

PrimeQ[Floor[Pi*10^i]]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15257] PrimeQ[Floor[Pi*10^i]]
  • From: haha at astral.magic.ca (Hans Havermann)
  • Date: Wed, 30 Dec 1998 01:50:20 -0500
  • Organization: Rarebit Dreams
  • Sender: owner-wri-mathgroup at wolfram.com

<<Utilities`ShowTime`

Flatten[Position[PrimeQ[Table[Floor[Pi*10^i],{i,0,999}]],True]] 268.233
Second
{1,2,6,38}

Flatten[Position[PrimeQ[Table[Floor[Pi*10^i],{i,1000,1999}]],True]+1000]
2961.12 Second
{}

Flatten[Position[PrimeQ[Table[Floor[Pi*10^i],{i,2000,2999}]],True]+2000]
13656.6 Second
{}

Flatten[Position[PrimeQ[Table[Floor[Pi*10^i],{i,3000,3999}]],True]+3000]
40945.8 Second
{}

Flatten[Position[PrimeQ[Table[Floor[Pi*10^i],{i,4000,4999}]],True]+4000]
65517.3 Second
{}

Flatten[Position[PrimeQ[Table[Floor[Pi*10^i],{i,5000,5999}]],True]+5000]
109428. Second
{}

Well, I'm getting to a point where I'm interested in doing the same -
further, only faster. I tried a 10000-place approximation to Pi instead
of Pi but my time-saving seemed minimal. Any ideas?


  • Prev by Date: problem with precision in NSolve
  • Next by Date: Re: Rotating Figures
  • Previous by thread: problem with precision in NSolve
  • Next by thread: Consultant Wanted