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!)
A277079 Least number k for which k^n contains n as a substring and n^k contains k as a substring. 1

%I #14 Sep 30 2016 13:03:53

%S 1,35,7,61,5,6,3,7,5,10,11,15,6,36,7,16,17,33,16,44,6,48,36,3,5,9,31,

%T 8,32,69,8,5,8,5,2,2,9,8,6,6,5,8,7,6,6,9,8,6,2,7,2,8,6,5,5,5,3,8,9,6,

%U 4,3,6,6,6,25,5,6,3,6,3,3,2,6,5,6,3,7,8,7,4,2

%N Least number k for which k^n contains n as a substring and n^k contains k as a substring.

%C a(n) = n for 1, 5, 6, 10, 11, 16, 17.

%C Records for a(1) = 1, a(2) = 35, a(4) = 61, a(30) = 69, a(1061) = 84, a(1256) = 91, ...

%H Paolo P. Lava, <a href="/A277079/b277079.txt">Table of n, a(n) for n = 1..1000</a>

%e 2^35 = 34359738368 and 35 is a substring;

%e 35^2 = 1225 and 2 is a substring.

%p P:=proc(q) local a,b,j,k,n,ok; for n from 1 to q do a:=convert(n,string); ok:=1; for k from 1 to q do if ok=1 then if searchtext(a,convert(k^n,string))>0 then b:=convert(k,string);

%p for j from 1 to q do if searchtext(b,convert(n^k,string))>0 then print(k); ok:=0; break; fi; od; fi; fi; od; od; end: P(10^3);

%t Table[k = 1; While[Or[Length@ SequencePosition[IntegerDigits[k^n], IntegerDigits[n]] == 0, Length@ SequencePosition[IntegerDigits[n^k], IntegerDigits[k]] == 0], k++]; k, {n, 120}] (* _Michael De Vlieger_, Sep 28 2016, Version 10.1 *)

%Y Cf. A061280.

%K nonn,base,easy

%O 1,2

%A _Paolo P. Lava_, Sep 28 2016

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 April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)