OFFSET
1,1
COMMENTS
All integers n >= 4 may trivially be expressed using only the digits 0 and 1 in three different bases: 2, n-1 (as '11') and n (as '10'). The numbers in this sequence cannot be expressed using only 0 and 1 in any other base.
The only positive integers that may be expressed using only the digits 0 and 1 in fewer than three different bases are 2 and 3, for which the values {2, n-1, n} are not all distinct or are not all valid bases.
An equivalent definition: For each term a(n) of this sequence, there are at most three integers k >= 2 for which a(n) is a sum of distinct nonnegative integer powers of k.
LINKS
Thomas Oléron Evans, Table of n, a(n) for n = 1..10000
Thomas Oléron Evans, Python program
EXAMPLE
5 is a term of the sequence, because 5 may be expressed using only the digits 0 and 1 in precisely three different bases: 2, 4 and 5 (5 is '12' in base 3).
9 is not a term of the sequence, because 9 can be expressed using only the digits 0 and 1 in four different bases: 2, 3, 8, 9 (9 is '100' in base 3).
MAPLE
filter:= proc(n)
local b;
for b from 3 to n-2 do
if max(convert(n, base, b)) <= 1 then return false
fi
od:
true
end proc:
select(filter, [$2..1000]); # Robert Israel, Jun 19 2015
PROG
(PARI) is(n)=if(n<2, return(0)); for(b=3, sqrtint(n), if(vecmax(digits(n, b))<2, return(0))); 1 \\ Charles R Greathouse IV, Jun 15 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Thomas Oléron Evans, Jun 15 2015
STATUS
approved