|
Search: id:A124603
|
|
|
| A124603 |
|
Position of the first 3 in the decimal expansion of the square root of n, or -1 if 3 never appears. |
|
+0 1
|
|
| -1, -1, 7, 3, -1, 3, 13, 8, 22, 1, 1, 1, 1, 1, 1, 1, -1, 4, 36, 2, 6, 28, 13, 6, 14, -1, 10, 15, 22, 2, 18, 8, 14, 12, 3, 10, -1, 9, 26, 11, 2, 4, 18, 6, 3, 7, 5, 21, 7, -1, 25, 23, 21, 23, 2, 23, 4, 6, 7, 30, 15, 17, 24, 3, -1, 20, 6, 5, 12, 2, 2, 10, 8, 7, 5, 9, 14, 8, 3, 11, 21, -1, 5, 6, 8, 17, 4, 2, 2, 3, 6, 3, 7, 4, 5, 8, 12, 42, 9, 8, -1
(list; graph; listen)
|
|
|
OFFSET
|
0,3
|
|
|
PROGRAM
|
(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: A078075 A067616 A019856 this_sequence A110636 A125681 A021899
Adjacent sequences: A124600 A124601 A124602 this_sequence A124604 A124605 A124606
|
|
KEYWORD
|
base,easy,sign
|
|
AUTHOR
|
Cino Hilliard (hillcino368(AT)hotmail.com), Dec 22 2006, corrected Jul 18 2007
|
|
|
Search completed in 0.002 seconds
|