login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239121 Smallest number k > 0 such that the decimal expansion of k^k contains n. 1
9, 1, 3, 5, 2, 4, 4, 3, 7, 9, 10, 11, 5, 19, 22, 26, 8, 17, 16, 19, 9, 8, 13, 7, 17, 4, 17, 3, 11, 18, 13, 5, 23, 17, 18, 7, 17, 15, 9, 18, 16, 17, 9, 7, 12, 28, 6, 23, 9, 24, 23, 13, 18, 11, 7, 14, 4, 18, 14, 13, 19, 11, 25, 17, 17, 6, 6, 8, 14, 27, 11, 26, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Giovanni Resta, Table of n, a(n) for n = 0..10000

EXAMPLE

a(0) = 9 because 9^9 = 387420489 has "0" as a substring;

a(1) = 1 because 1^1 = 1 has "1" as a substring;

a(2) = 3 because 3^3 = 27 has "2" as a substring;

a(3) = 5 because 5^5 = 3125 has "3" as a substring;

a(4) = 2 because 2^2 = 4 has "4" as a substring.

MATHEMATICA

a[n_] := (k = 1; While[ !MatchQ[ IntegerDigits[k^k], {___, Sequence @@ IntegerDigits[n], ___}], k++]; k); Table[a[n], {n, 0, 80}] (*program from Jean-Francois Alcover adapted for this sequence - see A030001 *)

snk[n_]:=Module[{k=1}, While[SequenceCount[IntegerDigits[k^k], IntegerDigits[ n]]<1, k++]; k]; Array[snk, 80, 0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 09 2019 *)

PROG

(PARI) overlap(long, short)=my(D=10^#digits(short)); while(long>=short, if(long%D==short, return(1)); long\=10); 0

a(n)=my(k); while(!overlap(k++^k, n), ); k \\ Charles R Greathouse IV, Mar 11 2014

CROSSREFS

Cf. A030001.

Sequence in context: A198835 A010167 A154181 * A019875 A248557 A198819

Adjacent sequences:  A239118 A239119 A239120 * A239122 A239123 A239124

KEYWORD

nonn,base

AUTHOR

Michel Lagneau, Mar 10 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 20:23 EDT 2019. Contains 323528 sequences. (Running on oeis4.)