The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A124689 Position of the first n in the decimal expansion of e^n, or -1 if the digits of n never appear. 0
 -1, 3, 17, 7, 2, 8, 19, 23, 3, 8, 53, 71, 290, 5, 157, 36, 201, 52, 48, 41, 214, 14, 38, 131, 48, 17, 19, 121, 33, 8, 50, 19, 315, 282, 3, 355, 43, 9, 135, 11, 19, 65, 114, 85, 123, 108, 312, 263, 59, 11, 148, 80, 168, 296, 26, 25, 55, 4, 82, 23, 96, 147 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS Conjecture: -1 only occurs in the first entry of the sequence. 1000-digit precision was used in the calculation. LINKS FORMULA e = 2.718281828... EXAMPLE e^0 = 1, 0 does not occur so -1 is in first entry in the table. e^1 = 2.718281828..., first 1 occurs in the third position so 3 is the second entry. e^2 = 7.3890560989306502272304274..., first 2 occurs in the 17th position, so 17 is the third entry in the table. MATHEMATICA Join[{-1}, Table[SequencePosition[RealDigits[E^n, 10, 1000][[1]], IntegerDigits[ n], 1][[1, 1]], {n, 90}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 06 2017 *) {-1}~Join~Table[Position[Partition[#, IntegerLength@ n, 1], IntegerDigits@ n][[1, 1]] &@ First@ RealDigits[E^n, 10, 10^4], {n, 90}] (* Michael De Vlieger, Mar 06 2017 *) PROG (PARI) digitposexp(n) = \ Exponential e, expansion first occurrence of n { local(x, y, r, dot); for(x=0, n, r = exp(x); if(r==floor(r), 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) = \Return the position of the first occurrence of string \match in string str { local(lnm, lns, x, c, i); str=Str(str); \This allows leaving quotes off input match=Str(match); c=0; i=0; lns=length(str); lnm=length(match); if(lnm>1, i=1); x=1; while(x<=lns-lnm+1, if(mid(str, x, lnm)== match, break, x++); ); if(x>lns, return(0), return(x)) } mid(str, s, n) = \ Get a substring of length n from string str starting at position s in str. { local(v, ln, x, tmp); v =""; tmp = Vec(str); ln=length(tmp); for(x=s, s+n-1, v=concat(v, tmp[x]); ); return(v) } iscube(n) = { local(r); r = n^(1/3); if(floor(r+.5)^3== n, 1, 0) } CROSSREFS Sequence in context: A231785 A195421 A140446 * A093844 A273211 A273273 Adjacent sequences:  A124686 A124687 A124688 * A124690 A124691 A124692 KEYWORD base,easy,sign AUTHOR Cino Hilliard, Dec 25 2006 EXTENSIONS Corrected by Harvey P. Dale, Mar 06 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 13 11:50 EDT 2021. Contains 343839 sequences. (Running on oeis4.)