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!)
A023693 Numbers with exactly 2 1's in ternary expansion. 4
4, 10, 12, 14, 16, 22, 28, 30, 32, 34, 36, 38, 42, 44, 46, 48, 50, 52, 58, 64, 66, 68, 70, 76, 82, 84, 86, 88, 90, 92, 96, 98, 100, 102, 104, 106, 108, 110, 114, 116, 126, 128, 132, 134, 136, 138, 140, 142, 144, 146, 150, 152, 154, 156, 158, 160, 166, 172, 174 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
From Bernard Schott, Jun 19 2023: (Start)
A003946 \ {1} is a subsequence since for m = 4*3^(k-1) with k >= 1, ternary expansion of m is 110...0 with (k-1) trailing 0's.
A034472 \ {2} is a subsequence since for m = 3^k + 1 with k >= 1, ternary expansion of m is 10...01 with (k-1) 0's between first and last 1's. (End)
LINKS
EXAMPLE
30 is a term since 30 = 1010_3 with exactly 2 1's.
MATHEMATICA
Select[ Range[ 162 ], (Count[ IntegerDigits[ #, 3 ], 1 ]==2)& ]
PROG
(PARI) isok(k) = #select(x->(x==1), digits(k, 3)) == 2; \\ Michel Marcus, Jun 19 2023
CROSSREFS
Sequence in context: A102998 A071179 A155475 * A299634 A181053 A239055
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved

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 May 8 03:50 EDT 2024. Contains 372317 sequences. (Running on oeis4.)