cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A387032 Numbers k with digits different from 0 and 1.

This page as a plain text file.
%I A387032 #40 Aug 14 2025 08:58:33
%S A387032 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,
%T A387032 43,44,45,46,47,48,49,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,
%U A387032 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
%N A387032 Numbers k with digits different from 0 and 1.
%C A387032 A062998 contains numbers like 123, 124, 125,.. which are not in this sequence. - _R. J. Mathar_, Aug 14 2025
%C A387032 A037344 contains numbers like 2047 and 4095 which are not in this sequence. - _R. J. Mathar_, Aug 14 2025
%H A387032 Michael De Vlieger, <a href="/A387032/b387032.txt">Table of n, a(n) for n = 1..10000</a>
%e A387032 2 is in the sequence since it does not contain 0 nor 1.
%e A387032 12 is not in the sequence since it has digit 1.
%p A387032 isA387032 := proc(n)
%p A387032     local d ;
%p A387032     for d in convert(n,base,10) do
%p A387032         if d <=1 then
%p A387032             return false;
%p A387032         end if;
%p A387032     end do:
%p A387032     true ;
%p A387032 end proc:
%p A387032 A387032 := proc(n)
%p A387032     option remember ;
%p A387032     local a;
%p A387032     if n = 1 then
%p A387032         2;
%p A387032     else
%p A387032         for a from procname(n-1)+1 do
%p A387032             if isA387032(a) then
%p A387032                 return a;
%p A387032             end if;
%p A387032         end do;
%p A387032     end if;
%p A387032 end proc:
%p A387032 seq(A387032(n),n=1..200) ; # _R. J. Mathar_, Aug 14 2025
%t A387032 Select[Range[222], Total@ DigitCount[#, 10, {0, 1}] == 0 &] (* _Michael De Vlieger_, Aug 13 2025 *)
%o A387032 (PARI) is(n) = if(n <= 0, return(0)); Set(digits(n))[1] >= 2
%o A387032 (Python)
%o A387032 def ok(n): return {"0","1"} & set(str(n)) == set()
%o A387032 print([k for k in range(223) if ok(k)]) # _Michael S. Branicky_, Aug 13 2025
%o A387032 (Python)
%o A387032 def A387032(n):
%o A387032     m = ((k:=7*n+1).bit_length()-1)//3
%o A387032     return sum((2+((k-(1<<3*m))//(7<<3*j)&7))*10**j for j in range(m)) # _Chai Wah Wu_, Aug 13 2025
%Y A387032 Intersection of A052382 and A052383.
%Y A387032 Cf. A037344, A172424.
%K A387032 nonn,base,easy
%O A387032 1,1
%A A387032 _David A. Corneth_, Aug 13 2025