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.

A081605 Numbers having at least one 0 in their ternary representation.

This page as a plain text file.
%I A081605 #20 Oct 13 2023 14:20:47
%S A081605 0,3,6,9,10,11,12,15,18,19,20,21,24,27,28,29,30,31,32,33,34,35,36,37,
%T A081605 38,39,42,45,46,47,48,51,54,55,56,57,58,59,60,61,62,63,64,65,66,69,72,
%U A081605 73,74,75,78,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100
%N A081605 Numbers having at least one 0 in their ternary representation.
%C A081605 Complement of A032924.
%C A081605 A212193(a(n)) <> 0. [_Reinhard Zumkeller_, May 04 2012]
%H A081605 Reinhard Zumkeller, <a href="/A081605/b081605.txt">Table of n, a(n) for n = 1..10000</a>
%t A081605 Select[Range[0,100],DigitCount[#,3,0]>0&] (* _Harvey P. Dale_, Aug 10 2021 *)
%o A081605 (Haskell)
%o A081605 import Data.List (findIndices)
%o A081605 a081605 n = a081605_list !! (n-1)
%o A081605 a081605_list = findIndices (/= 0) a212193_list
%o A081605 -- _Reinhard Zumkeller_, May 04 2012
%o A081605 (Python)
%o A081605 from itertools import count, islice
%o A081605 def A081605_gen(): # generator of terms
%o A081605     a = -1
%o A081605     for n in count(2):
%o A081605         b = int(bin(n)[3:],3) + (3**(n.bit_length()-1)-1>>1)
%o A081605         yield from range(a+1,b)
%o A081605         a = b
%o A081605 A081605_list = list(islice(A081605_gen(),30)) # _Chai Wah Wu_, Oct 13 2023
%Y A081605 Cf. A007089, A077267, A081607, A081606, A074940.
%K A081605 nonn,base
%O A081605 1,2
%A A081605 _Reinhard Zumkeller_, Mar 23 2003