You can run this with or without a numeric argument. I wouldn't recommend numeric arguments past 15; it becomes pretty processor bound.
$p=Math::BigFloat;$n=$ARGV[0]||10;$p->accuracy(400);$w=do{$w=$p->new; $w+=1/$p->new($_)->bfac for 0..125;$w->bstr};for(0..length($w)-$n){$z =substr$w,$_,$n;use Math::BigFloat;if(ip($z)){print"$z \@ $_$/";last} }sub ip{($y)=@_;($s,$d)=(sqrt$y,2);{return if$y%$d==0;last if$d++>$s; redo}1}
Dave
In reply to A natural occurrence by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |