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!)
 A248504 Least number k > 0 such that n^k contains 666 in its decimal representation, or 0 if no such k exists. 1
 0, 157, 34, 96, 102, 18, 70, 64, 17, 0, 42, 41, 25, 44, 30, 48, 16, 97, 30, 157, 50, 33, 15, 35, 51, 12, 35, 10, 34, 34, 34, 44, 44, 30, 47, 9, 20, 46, 23, 96, 33, 13, 42, 32, 39, 17, 8, 27, 35, 102, 22, 42, 80, 55, 28, 55, 38, 19, 48, 18, 74, 15, 31, 32, 37 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(n) <= a(2) = 157 for all n <= 10^5.  Is there any n for which a(n) > 157? - Robert Israel, Dec 01 2014 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 EXAMPLE a(2)=157 because 2^157=182687704666362864775460604089535377456991567872 contains '666' (see A007356). a(3)=34 because 3^34=16677181699666568 contains '666' and belongs to A051003. MAPLE f:= proc(n) local k; if n = 10^ilog10(n) then return 0 fi; for k from 1 do   if StringTools[Search]("666", sprintf("%d", n^k)) <> 0 then return k fi od end proc; seq(f(n), n=1..1000); # Robert Israel, Dec 01 2014 PROG (PARI) isok(n) = {d = digits(n); for (i=1, #d-3, if ((d[i] == 6) && (d[i+1]==6) && (d[i+2]==6), return(1)); ); return (0); } a(n) = {if ((n==1) || (n==10) || (ispower(n, , &p) && (p==10)), return(0)); k = 1; while (! isok(n^k), k++); k; } \\ Michel Marcus, Dec 01 2014 CROSSREFS Cf. A007356, A051003. Sequence in context: A216788 A239338 A028675 * A090851 A045230 A180551 Adjacent sequences:  A248501 A248502 A248503 * A248505 A248506 A248507 KEYWORD nonn,base,less AUTHOR Talha Ali, Dec 01 2014 EXTENSIONS More terms from Alois P. Heinz, Dec 01 2014 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 August 5 04:03 EDT 2021. Contains 346457 sequences. (Running on oeis4.)