cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A253600 Smallest exponent k>1 such that n and n^k have some digits in common.

This page as a plain text file.
%I A253600 #19 Jun 04 2024 11:04:03
%S A253600 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,
%T A253600 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,
%U A253600 2,2,2,2,3,2,2,2,2,5,2,3,2,2,2,2,3,2,2
%N A253600 Smallest exponent k>1 such that n and n^k have some digits in common.
%C A253600 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
%H A253600 Robert Israel, <a href="/A253600/b253600.txt">Table of n, a(n) for n = 0..10000</a>
%e A253600 For n=2, 2^k has no digit in common with 2 until k reaches 5 to give 32, hence a(2)=5.
%p A253600 f:= proc(n) local L,k;
%p A253600  L:= convert(convert(n,base,10),set);
%p A253600  for k from 2 do
%p A253600    if convert(convert(n^k,base,10),set) intersect L <> {} then
%p A253600      return k
%p A253600    fi
%p A253600  od
%p A253600 end proc:
%p A253600 map(f, [$0..100]); # _Robert Israel_, Mar 17 2020
%t A253600 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 *)
%o A253600 (PARI) a(n) = {sd = Set(vecsort(digits(n))); k=2; while (#setintersect(sd, Set(vecsort(digits(n^k)))) == 0, k++); k;}
%Y A253600 Cf. sequences where a(n)=k: A103173 (k=5), A189056 (k=2), A253601 (k=3), A253602 (k=4).
%Y A253600 Cf. A373203.
%K A253600 nonn,base
%O A253600 0,1
%A A253600 _Michel Marcus_, Jan 05 2015