Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A114344
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A114344 Starting position of the first n in the decimal expansion of the square root of n, or -1 if n never appears. +0
1
1, 1, 5, 3, -1, 37, 39, 5, 2, -1, 89, 20, 52, 222, 319, 49, -1, 12, 99, 25, 144, 61, 41, 9, 109, -1, 145, 10, 268, 33, 189, 184, 155, 371, 45, 108, -1, 118, 26, 11, 149, 146, 108, 5, 235, 49, 299, 253, 32, -1, 103, 212, 120, 179, 353, 119, 225, 64, 10, 108, 104 (list; graph; listen)
OFFSET

0,3

EXAMPLE

For n=5, sqrt(5) = 2.23606797749978969640917366873127623544...

5 occurs in the 37-th position so 37 is the 6-th entry in the table counting from the 0-th entry.

PROGRAM

(PARI) digitpos(n) = { local(x, y, r, dot); for(x=0, n, r=sqrt(x); if(issquare(x), y=find(Str(floor(r)), x), y=find(Str(r), x); 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: A157891 A115991 A143410 this_sequence A088324 A052038 A040022

Adjacent sequences: A114341 A114342 A114343 this_sequence A114345 A114346 A114347

KEYWORD

base,easy,sign

AUTHOR

Cino Hilliard (hillcino368(AT)hotmail.com), Dec 22 2006, corrected Jul 18 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 29 12:46 EST 2009. Contains 167659 sequences.


AT&T Labs Research