A362096 Numbers k such that 3^k starts with k.
185, 225, 286, 182822, 8547303, 102886695, 472597369, 7627072026
Offset: 1
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.
filter:= proc(n) local d1, d2, t; t:= 8^n; d1:= ilog10(t); d2:= ilog10(n); floor(t/10^(d1-d2)) = n end proc: select(filter, [$1..10^5]); # Robert Israel, Apr 10 2023
from itertools import count, islice def A362100_gen(startvalue=1): # generator of terms >= startvalue a = 1<<3*(m:=max(startvalue,1)) for n in count(m): if (s:=str(n))==str(a)[:len(s)]: yield n a <<= 3 A362100_list = list(islice(A362100_gen(),5)) # Chai Wah Wu, Apr 10 2023
a(3) = 32, because 32^3 = 32768 begins with 32, and no lesser number k > 2 and not a power of 10 has this property.
a(n) = my(k=2); while(!((v = strsplit(Str(k^n), Str(k))) && (#v >= 2) && (v[1] == "")), k++; if (sumdigits(k)==1, k++)); k; \\ Michel Marcus, Apr 11 2023
from itertools import count def a(n): return next(k for k in count(2) if (s:=str(k)).strip("0")!="1" and str(k**n).startswith(s)) print([a(n) for n in range(3, 75)]) # Michael S. Branicky, Apr 11 2023