login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081605 Numbers having at least one 0 in their ternary representation. 10

%I #20 Oct 13 2023 14:20:47

%S 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 38,39,42,45,46,47,48,51,54,55,56,57,58,59,60,61,62,63,64,65,66,69,72,

%U 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 Numbers having at least one 0 in their ternary representation.

%C Complement of A032924.

%C A212193(a(n)) <> 0. [_Reinhard Zumkeller_, May 04 2012]

%H Reinhard Zumkeller, <a href="/A081605/b081605.txt">Table of n, a(n) for n = 1..10000</a>

%t Select[Range[0,100],DigitCount[#,3,0]>0&] (* _Harvey P. Dale_, Aug 10 2021 *)

%o (Haskell)

%o import Data.List (findIndices)

%o a081605 n = a081605_list !! (n-1)

%o a081605_list = findIndices (/= 0) a212193_list

%o -- _Reinhard Zumkeller_, May 04 2012

%o (Python)

%o from itertools import count, islice

%o def A081605_gen(): # generator of terms

%o a = -1

%o for n in count(2):

%o b = int(bin(n)[3:],3) + (3**(n.bit_length()-1)-1>>1)

%o yield from range(a+1,b)

%o a = b

%o A081605_list = list(islice(A081605_gen(),30)) # _Chai Wah Wu_, Oct 13 2023

%Y Cf. A007089, A077267, A081607, A081606, A074940.

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Mar 23 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 14:51 EDT 2024. Contains 371749 sequences. (Running on oeis4.)