|
| |
|
|
A124600
|
|
Position of the first 0 in the decimal expansion of the square root of n, or -1 if 0 never appears.
|
|
0
| |
|
|
1, -1, 14, 5, -1, 5, 17, 11, 16, -1, 10, 10, 6, 3, 36, 12, -1, 6, 7, 13, 37, 16, 4, 26, 52, -1, 2, 12, 6, 9, 11, 13, 16, 14, 4, 5, -1, 2, 8, 18, 10, 3, 4, 12, 10, 3, 20, 9, 6, -1, 2, 48, 6, 4, 49, 11, 32, 13, 9, 15, 19, 4, 5, 21, -1, 2, 5, 24, 17, 3, 6, 19, 16, 5, 3, 4, 11, 17, 7, 19, 9
(list; graph; refs; listen; history; internal format)
|
|
|
|
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 36-th position of this string of digits so 36 is the 15-th entry the table counting from the 0-th entry.
|
|
|
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
| Sequence in context: A070648 A040188 A040186 * A084676 A180848 A068609
Adjacent sequences: A124597 A124598 A124599 * A124601 A124602 A124603
|
|
|
KEYWORD
| base,easy,sign
|
|
|
AUTHOR
| Cino Hilliard (hillcino368(AT)hotmail.com), Dec 22 2006, corrected Jul 18 2007
|
| |
|
|