login
A387032
Numbers k with digits different from 0 and 1.
5
2, 3, 4, 5, 6, 7, 8, 9, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 222
OFFSET
1,1
COMMENTS
A062998 contains numbers like 123, 124, 125,.. which are not in this sequence. - R. J. Mathar, Aug 14 2025
A037344 contains numbers like 2047 and 4095 which are not in this sequence. - R. J. Mathar, Aug 14 2025
LINKS
EXAMPLE
2 is in the sequence since it does not contain 0 nor 1.
12 is not in the sequence since it has digit 1.
MAPLE
isA387032 := proc(n)
local d ;
for d in convert(n, base, 10) do
if d <=1 then
return false;
end if;
end do:
true ;
end proc:
A387032 := proc(n)
option remember ;
local a;
if n = 1 then
2;
else
for a from procname(n-1)+1 do
if isA387032(a) then
return a;
end if;
end do;
end if;
end proc:
seq(A387032(n), n=1..200) ; # R. J. Mathar, Aug 14 2025
MATHEMATICA
Select[Range[222], Total@ DigitCount[#, 10, {0, 1}] == 0 &] (* Michael De Vlieger, Aug 13 2025 *)
PROG
(PARI) is(n) = if(n <= 0, return(0)); Set(digits(n))[1] >= 2
(Python)
def ok(n): return {"0", "1"} & set(str(n)) == set()
print([k for k in range(223) if ok(k)]) # Michael S. Branicky, Aug 13 2025
(Python)
def A387032(n):
m = ((k:=7*n+1).bit_length()-1)//3
return sum((2+((k-(1<<3*m))//(7<<3*j)&7))*10**j for j in range(m)) # Chai Wah Wu, Aug 13 2025
CROSSREFS
Intersection of A052382 and A052383.
Sequence in context: A305463 A062998 A037344 * A249443 A299690 A318276
KEYWORD
nonn,base,easy
AUTHOR
David A. Corneth, Aug 13 2025
STATUS
approved