login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest number which has more different digits than its n-th power, or -1 if no such number exists.
0

%I #17 May 26 2023 01:01:58

%S 109,1920,26730,4385270,13486709,13652048,134267085,285963417,

%T 341872690,1032479568,1026349857,1027563984,1029637584,1239574806,

%U 2059716348,1654923078,58157032649,8152497360,17345693802,127601348591

%N Smallest number which has more different digits than its n-th power, or -1 if no such number exists.

%C a(22), a(23), a(24) > 2*10^11, if they exist. - _Giovanni Resta_, Aug 06 2019

%e 1920 is the smallest number which has more different digits than its cube (4 digits vs. 3 digits in 7077888000 = 1920^3), hence a(3) = 1920

%o (Python)

%o from itertools import count

%o def a(n): return next(k for k in count(1) if len(set(str(k))) > len(set(str(k**n))))

%o print([a(n) for n in range(2, 6)]) # _Michael S. Branicky_, May 25 2023

%Y Cf. A061277, A061374.

%K nonn,base,hard,more

%O 2,1

%A Ulrich Schimke (ulrschimke(AT)aol.com)

%E a(6) and a(7) from _Stefan Steinerberger_, Sep 07 2007

%E a(8)-a(17) from _Sean A. Irvine_, Dec 02 2010

%E a(18)-a(21) from _Giovanni Resta_, Aug 06 2019