%I #78 Nov 06 2020 23:45:39
%S 2,3,4,10,36,40,82,256
%N Numbers k for which there are only 2 bases b (2 and k+1) where the digits of k contain the digit b-1.
%C These could be called "nine-free numbers".
%C From _David A. Corneth_, Aug 31 2020: (Start)
%C This sequence has density 0. Conjecture: this sequence is finite and full. a(9) > 10^100 if it exists.
%C Suppose we want to see if 22792 = 1011021011_3 is a term. Since it has a digit of 2 in base 3, we can see that it is not. The next number that does not have the digit 2 in base 3 is 1011100000_3 = 22842, so we can proceed from there. In a similar way we can skip numbers based on bases b > 3. (End)
%C All terms of this sequence increased by 1 (except a(2)=3) are prime. - _François Marques_, Aug 31 2020
%C From _Devansh Singh_, Sep 19 2020: (Start)
%C If n is one less than an odd prime and we are interested in bases 3 <= b <= n-1 such that n in base b contains the digit b-1, then divisor of b (except 1) -1 cannot be the last digit since divisor of b divides n+1, which is not possible as n+1 is an odd prime.
%C If the last digit is 1, then b is odd as 1 = 2-1 and 2 cannot divide b as n+1 is an odd prime.
%C If the last digit is 0, then b-1 is the last digit of n-1 in base b.
%C b <= n/2 for even n,b <= (n+1)/2 for odd n.
%C This sequence is equivalent to the existence of only one prime generating polynomial = F(x) (having positive integer coefficients >=0 and <=b-1 for F(b)) such that F(2) = p.
%C There is no other prime generating polynomial = G(x) (having positive integer coefficients >=0 and <= b-1 for G(b)) that generates p for 2 < x = b <= (p-1)/2.
%C (End)
%H David A. Corneth, <a href="/A337536/a337536.gp.txt">PARI program</a>
%e 2 is a term because 2 = 10_2 = 2_3, so both have the digit b-1, and there are no other bases where this happens.
%e 4 is a term because 4 = 100_2 = 4_5, so both have the digit b-1, and there are no other bases where this happens.
%o (PARI) isok(n, b) = vecmax(digits(n, b)) == b-1;
%o b(n) = if (n==1, return (1)); my(b=3); while(!isok(n, b), b++); b; \\ A337535
%o is(n) = b(n) == n+1;
%o (PARI) \\ See Corneth link \\ _David A. Corneth_, Aug 31 2020
%Y Cf. A005836, A007095, A023717, A020654, A020657, A037465, A037474, A037477, A337496, A337535.
%Y Subsequence of A005836 U {2} and of A068499.
%K nonn,base,more
%O 1,1
%A _Michel Marcus_, Aug 31 2020