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.
%I A291926 #50 Oct 08 2021 12:05:03 %S A291926 1,5,0,18,25,20,0,61,68,64,72,103,110,134,0,138,141,140,141,172,191, %T A291926 228,225,244,306,281,272,339,384,412,0,390,421,372,472,395,441,486, %U A291926 495,473,566,576,629,735,626,661,706,707,741,825,782,751,811,924,930,908,927,975,1049,934,1018,1070,0 %N A291926 a(n) is the smallest integer k>=0 such that 2^k contains every digit in base n, or 0 if no such integer exists. %C A291926 a(n) >= ceiling(log_2(n)*(n-1)), whenever a(n)>0. This is because in order for an integer to have n digits in base n it must have at least a magnitude of n-1 in base n. %C A291926 a(n) = 0 at all powers of 2 (except 2 itself). This is because powers of 2 in power-of-2 bases can only have 2 distinct digits. Is a(n) equal to 0 for any other values of n? %C A291926 It seems that the base n representation of 2^(2*n^2) contains all n digits whenever n is not a power of 2. A proof of this would yield a negative answer to the above question. In the absence of a negative answer to this question, at least an algorithm would be desirable whose application to any concrete value of n solves the problem whether a(n)=0 for this n (for instance, if a(n)<n^2 for all n then a proof of this would yield such an algorithm). - _Dimiter Skordev_, Aug 18 2021 %H A291926 Chai Wah Wu, <a href="/A291926/b291926.txt">Table of n, a(n) for n = 2..512</a> (n = 2..256 from Ely Golden). %e A291926 a(3) = 5, since 2^5 is the smallest power of 2 which contains every digit in base 3: Namely, 2^5 is 1012 in base 3, whereas the previous powers are 1, 2, 11, 22, and 121, respectively, none of which contain all possible base-3 digits. %t A291926 TakeWhile[#, # > -1 &] &@ Table[If[And[IntegerQ@ #, # > 1] &@ Log2@ n, 0, SelectFirst[Range[2^11], Times @@ DigitCount[2^#, n] > 0 &]] /. k_ /; MissingQ@ k -> -1, {n, 2, 64}] (* _Michael De Vlieger_, Sep 05 2017 *) %o A291926 (Python) %o A291926 def floorLog(b,n): %o A291926 x=-1 %o A291926 while(n>0): %o A291926 x+=1 %o A291926 n//=b %o A291926 return x %o A291926 def distinctDigits(n,b): %o A291926 li=[] %o A291926 while(n>0): %o A291926 li.append(n%b) %o A291926 n//=b %o A291926 li=list(set(li)) %o A291926 li.sort() %o A291926 return li %o A291926 def iroot(k,n): %o A291926 u, s = n, n+1 %o A291926 while u < s: %o A291926 s = u %o A291926 t = (k-1) * s + n // (s**(k-1)) %o A291926 u = t // k %o A291926 return s %o A291926 def perfectPower(n): %o A291926 if(n==1): return 0 %o A291926 x=1 %o A291926 for i in range(2,floorLog(2,n)+1): %o A291926 if(iroot(i,n)**i==n): x=i %o A291926 return x %o A291926 def leastPandigital(b,n): %o A291926 if(n<=1 or b<=1): return 0 %o A291926 if(n==2): return 2 if (b==(1<<b.bit_length())-1) else 1 %o A291926 if(iroot(perfectPower(n),n)==iroot(perfectPower(b),b)): return 0 %o A291926 a=(floorLog(b,n)*(n-1)) %o A291926 while(distinctDigits(b**a,n)!=list(range(n))): a+=1 %o A291926 return a %o A291926 for i in range(2,257): %o A291926 print(str(i)+" "+str(leastPandigital(2,i))) %o A291926 (Python) %o A291926 from sympy.ntheory.digits import digits %o A291926 def a(n): %o A291926 b = bin(n)[2:] %o A291926 if b.strip('0') == '1': return int(n == 2) %o A291926 k = (len(b)-1)*(n-1) %o A291926 while len(set(digits(2**k, n)[1:])) != n: k += 1 %o A291926 return k %o A291926 print([a(n) for n in range(2, 65)]) # _Michael S. Branicky_, Oct 07 2021 %o A291926 (PARI) a(n) = {if (n==2, return (1)); if (ispower(n,,&k) && (k==2), return (0)); k = 1; while (#Set(digits(2^k, n)) != n, k++); k;} \\ _Michel Marcus_, Sep 06 2017 %Y A291926 Cf. A090493. %K A291926 nonn,base %O A291926 2,2 %A A291926 _Ely Golden_, Sep 05 2017