Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
a(n) is the smallest number k > 0 such that for each b = 2..n the base-b expansion of k has exactly n - b zeros.
0

%I #20 Jan 10 2020 12:24:23

%S 1,2,10,18,271

%N a(n) is the smallest number k > 0 such that for each b = 2..n the base-b expansion of k has exactly n - b zeros.

%C This list is complete. Proof: When converting base 2 to base 4, we can group the digits in base 2 into pairs from the least significant bit. We then convert pairs into single digits in base 4 as 00 -> 0, 01 -> 1, 10 -> 2, 11 -> 3. This always causes the number of zeros to go to half or less than half. For all n >= 7, n-4 is greater than (n-2)/2, so the condition is impossible. - _Christopher Cormier_, Dec 08 2019

%C Does k exist for every n >= 2?

%C a(7) > 10^7, if it exists.

%C a(7) > 2^64, if it exists. - _Giovanni Resta_, Dec 01 2019

%e For n = 6: The base-b expansions of 271 for b = 2..6 are shown in the following table:

%e b | base-b expansion | number of zeros

%e ---------------------------------------

%e 2 | 100001111 | 4

%e 3 | 101001 | 3

%e 4 | 10033 | 2

%e 5 | 2041 | 1

%e 6 | 1131 | 0

%o (PARI) count_zeros(vec) = #setintersect(vecsort(vec), vector(#vec))

%o a(n) = for(k=1, oo, for(b=2, n, if(count_zeros(digits(k, b))!=n-b, break, if(b==n, return(k)))))

%K nonn,base,fini,full

%O 2,2

%A _Felix Fröhlich_, Dec 01 2019

%E Value of a(2) adjusted by _Felix Fröhlich_, Dec 09 2019