OFFSET
0,3
COMMENTS
The real 0's representations after the decimal point of the expansion of the square root of perfect squares are ignored. In other words for sqrt(4) = 2.0000..., the trailing 0's are ignored.
EXAMPLE
For n=14, the concatenated digits of sqrt(14) are The digit 0 in the 36th position of this string of digits so 36 is the 15th entry the table counting from the 0th entry.
MATHEMATICA
Join[{1}, Table[If[IntegerQ[Sqrt[n]], {{-1, -1}}, SequencePosition[ RealDigits[ Sqrt[n], 10, 100][[1]], {0}, 1]], {n, 100}][[All, 1]][[All, 1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 02 2016 *)
PROG
(PARI) digitpos(n, m) = /* m-th digit in sqrt expansions */ { local(x, y, r, dot); default(realprecision, 1000); for(x=0, n, r = sqrt(x); if(issquare(x), y=find(Str(floor(r)), m), y=find(Str(r), m); dot=find(Str(r), "."); if(dot < y, y--); ); if(y, print1(y", "), print1(-1", ") ) ) } find(str, match) = /* Revised 2007 */ { local(lnm, lns, tstr, vstr, x, j); vstr=Vec(Str(str)); match=Str(match); lns=length(str); lnm=length(match); for(x=1, lns-lnm+1, tstr=""; for(j=x, x+lnm-1, tstr=concat(tstr, vstr[j]); ); if(match==tstr, return(x)) ); return(0); }
CROSSREFS
KEYWORD
base,easy,sign
AUTHOR
Cino Hilliard, Dec 22 2006, corrected Jul 18 2007
STATUS
approved