[seqfan] A071901: Mmca code for large n's?

zak seidov zakseidov at yahoo.com
Tue Nov 17 14:30:13 CET 2009


In
A071901 n-th decimal digit of the fractional part of the square root of the n-th prime. ,

Mmca code is OK up to n=114

q[n_] := Mod[Floor[10^n*Sqrt[Prime[n]]], 10]; Table[q[n], {n, 114}]

but at n=115 (and larger n's) Mmca complains:
q[115]
Internal precision limit $MaxExtraPrecision ... reached while evaluating... 

This version happlily gives even 100000th term
in no time:
Table[rd=RealDigits[N[Sqrt[Prime[n]],2*n]];
  rd[[1,rd[[2]]+n]],{n,10000,100000,10000}]
{4,5,2,6,2,2,6,7,2,3}

Any ideas? 
C++? PARI?

Zak


      




More information about the SeqFan mailing list