OFFSET
0,3
COMMENTS
a(n) = Min_({k | A337496(k)=n}) if the set is not empty, else -1.
Conjecture: a(n) > log(n)^(sqrt(2)*log(n)) for n>1. This have been checked for n<3444, and for n<10275 unless if a(n)=-1.
LINKS
François Marques, Table of n, a(n) for n = 0..3443
François Marques, Table of known a(n) values, for n = 0..10000. Unknown values are replaced by a question mark.
EXAMPLE
a(7) is 39 because 39 has 7 bases b (which are 2,4,5,8,10,20 and 40) where the digits of n contain the digit b-1 and this does not happen for a smaller integer.
MATHEMATICA
mainBaseQ[n_, b_] := MemberQ[IntegerDigits[n, b], b - 1]; basesCount[n_] := Count[Range[2, n + 1], _?(mainBaseQ[n, #] &)]; m = 50; seq = Table[-1, {m}]; c = 0; n = 0; While[c < m, i = basesCount[n]; If[i <= m - 1 && seq[[i + 1]] < 0, c++; seq[[i + 1]] = n]; n++]; seq (* Amiram Eldar, Sep 01 2020 *)
PROG
(PARI) a(n) = for(k=0, +oo, if(sum(b=2, k+1, vecmax(digits(k, b)) == b-1)==n, return(k)) ); \\ François Marques, Nov 19 2020
CROSSREFS
KEYWORD
nonn,base,hard
AUTHOR
François Marques, Aug 29 2020
STATUS
approved