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.

A023693 Numbers with exactly 2 1's in ternary expansion.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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)

Examples

			30 is a term since 30 = 1010_3 with exactly 2 1's.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 162 ], (Count[ IntegerDigits[ #, 3 ], 1 ]==2)& ]
  • PARI
    isok(k) = #select(x->(x==1), digits(k, 3)) == 2; \\ Michel Marcus, Jun 19 2023