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!)
A090493 Least k such that n^k contains all the digits from 0 through 9, or 0 if no such k exists. 6

%I #67 Aug 17 2021 02:23:51

%S 0,68,39,34,19,20,18,28,24,0,23,22,22,21,12,17,14,21,17,51,17,18,14,

%T 19,11,18,13,11,12,39,11,14,16,14,19,10,13,14,17,34,11,17,13,16,15,11,

%U 12,12,9,18,16,11,13,10,12,7,13,11,11,20,14,18,13,14,10,13,10,9,11,18,15

%N Least k such that n^k contains all the digits from 0 through 9, or 0 if no such k exists.

%C Note that the values of n for which a(n) = 1 have density 1.

%C Is it known that a(n)=0 only for n a power of 10? - _Christopher J. Smyth_, Aug 21 2014

%C a(n) >= ceiling(log_n(10)*9), whenever a(n)>0. This is because in order for an integer to have 10 digits its base-10 magnitude must be at least 9. - _Ely Golden_, Sep 06 2017

%H Seiichi Manyama, <a href="/A090493/b090493.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)

%H Ely Golden, <a href="/A090493/a090493.py.txt">Python program to generate a(n)</a>

%F a(10^e) = 0; a(m^e) = a(m)/e for e dividing a(m). - _Reinhard Zumkeller_, Dec 06 2004

%e a(5)=19: 5^19 = 19073486328125.

%p a:= proc(n) local k;

%p if n = 10^ilog10(n) then return 0 fi;

%p for k from 1 do

%p if nops(convert(convert(n^k,base,10),set))=10 then return k fi

%p od

%p end proc:

%p seq(a(n),n=1..100); # _Robert Israel_, Aug 20 2014

%t Table[If[IntegerQ@ Log10[n], 0, SelectFirst[Range[#, # + 100] &@ Ceiling[9 Log[n, 10]], NoneTrue[DigitCount[n^#], # == 0 &] &]], {n, 71}] (* _Michael De Vlieger_, Sep 06 2017 *)

%o (PARI) a(n) = if (n == 10^valuation(n, 10), return (0)); k=1; while(#vecsort(digits(n^k),,8)!=10, k++); k; \\ _Michel Marcus_, Aug 20 2014

%o (Python)

%o def a(n):

%o s = str(n)

%o if n == 1 or (s.count('0')==len(s)-1 and s.startswith('1')):

%o return 0

%o k = 1

%o count = 0

%o while count != 10:

%o count = 0

%o for i in range(10):

%o if str(n**k).count(str(i)) == 0:

%o count += 1

%o break

%o if count:

%o k += 1

%o else:

%o return k

%o n = 1

%o while n < 100:

%o print(a(n), end=', ')

%o n += 1

%o # _Derek Orr_, Aug 20 2014

%Y Cf. A020665, A062518, A171102.

%Y Exponents of powers of k that contain all ten decimal digits: A130694 (k=2), A236673 (k=3), A284670 (k=5), A284672 (k=7).

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Dec 03 2003

%E More terms from _Reinhard Zumkeller_, Dec 06 2004

%E Corrected a(15), a(17), a(38), a(48), a(56) and a(65). (For each of these terms, the only 1 in n^k is the first digit.) - _Jon E. Schoenfield_, Sep 20 2008

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)