OFFSET
0,1
LINKS
EXAMPLE
a(1) = 5 because A006988(1) = prime(10^1) = 29 = 11101 (base 2) has five bits.
PROG
(PARI) a(n)=if(n<3, return([2, 5, 10][n+1])); my(l=n*log(10), ll=log(l), x=n*log(10)/log(2), lb=ceil(x+log(l+ll-1+(ll-2.2)/l)/log(2)), ub=ceil(x+log(l+ll-1+(ll-2)/l)/log(2))); if(lb==ub, lb, error("Cannot determine a("n")"))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rick L. Shepherd, Oct 11 2004
EXTENSIONS
Extension, program, and reference from Charles R Greathouse IV, Aug 03 2010
STATUS
approved