login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A253600 Smallest exponent k>1 such that n and n^k have some digits in common. 5
2, 2, 5, 5, 3, 2, 2, 5, 5, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 4, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 2, 4, 2, 2, 2, 2, 2, 5, 3, 2, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 5, 2, 3, 2, 2, 2, 2, 3, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
For all n, n^5-n is divisible by 10, and so n^5 == n (mod 10). Thus a(n) <= 5 for all n. - Tom Edgar, Jan 06 2015
LINKS
EXAMPLE
For n=2, 2^k has no digit in common with 2 until k reaches 5 to give 32, hence a(2)=5.
MAPLE
f:= proc(n) local L, k;
L:= convert(convert(n, base, 10), set);
for k from 2 do
if convert(convert(n^k, base, 10), set) intersect L <> {} then
return k
fi
od
end proc:
map(f, [$0..100]); # Robert Israel, Mar 17 2020
MATHEMATICA
seq={}; Do[k=1; Until[ContainsAny[IntegerDigits[n], IntegerDigits[n^k]], k++]; AppendTo[seq, k] , {n, 0, 86}]; seq (* James C. McMahon, Jun 04 2024 *)
PROG
(PARI) a(n) = {sd = Set(vecsort(digits(n))); k=2; while (#setintersect(sd, Set(vecsort(digits(n^k)))) == 0, k++); k; }
CROSSREFS
Cf. sequences where a(n)=k: A103173 (k=5), A189056 (k=2), A253601 (k=3), A253602 (k=4).
Cf. A373203.
Sequence in context: A283825 A005177 A357123 * A373203 A045537 A243941
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Jan 05 2015
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 23:11 EDT 2024. Contains 374360 sequences. (Running on oeis4.)