login
Numbers k such that 8^k starts with k.
1

%I #8 Apr 16 2023 20:28:26

%S 4,10,18,652,1299,8225,12949,56230,156277,3227298,144225157

%N Numbers k such that 8^k starts with k.

%p filter:= proc(n) local d1, d2, t;

%p t:= 8^n;

%p d1:= ilog10(t);

%p d2:= ilog10(n);

%p floor(t/10^(d1-d2)) = n

%p end proc:

%p select(filter, [$1..10^5]); # _Robert Israel_, Apr 10 2023

%o (Python)

%o from itertools import count, islice

%o def A362100_gen(startvalue=1): # generator of terms >= startvalue

%o a = 1<<3*(m:=max(startvalue,1))

%o for n in count(m):

%o if (s:=str(n))==str(a)[:len(s)]:

%o yield n

%o a <<= 3

%o A362100_list = list(islice(A362100_gen(),5)) # _Chai Wah Wu_, Apr 10 2023

%Y For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

%K nonn,base,more

%O 1,1

%A _N. J. A. Sloane_, Apr 10 2023, based on an email from _Keith F. Lynch_.