A258946 Numbers that can be expressed using only the digits 0 and 1 in no more than three different bases.
2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 18, 19, 22, 23, 24, 29, 32, 33, 34, 35, 38, 41, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 66, 67, 70, 71, 74, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 92, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107
Offset: 1
Examples
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).
Links
- Thomas Oléron Evans, Table of n, a(n) for n = 1..10000
- Thomas Oléron Evans, Python program
Programs
-
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
-
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
Comments