login
Smallest n-th power starting with 2.
9

%I #9 Feb 25 2021 21:17:00

%S 2,25,27,256,243,262144,2187,256,262144,282475249,2048,244140625,

%T 2541865828329,268435456,205891132094649,2821109907456,

%U 232630513987207,262144,274877906944,278218429446951548637196401,2097152,2384185791015625,27368747340080916343

%N Smallest n-th power starting with 2.

%C Terms from _Robert G. Wilson v_.

%t a = {}; Do[k = 1; While[First[IntegerDigits[k^n]] != 2, k++ ]; a = Append[a, k^n], {n, 1, 25}]; a (* _Robert G. Wilson v_ *)

%o (Python)

%o def a(n):

%o r = 1

%o while str(r**n)[0] != '2': r += 1

%o return r**n

%o print([a(n) for n in range(1, 24)]) # _Michael S. Branicky_, Feb 25 2021

%Y Cf. A067442.

%K base,easy,nonn

%O 1,1

%A _Amarnath Murthy_, Feb 05 2002