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.

A370921 Positive integers in whose ternary representation, 2 occurs at least once, and every 2 is followed by 1.

Original entry on oeis.org

7, 16, 21, 22, 34, 43, 48, 49, 63, 64, 66, 67, 70, 88, 97, 102, 103, 115, 124, 129, 130, 144, 145, 147, 148, 151, 189, 190, 192, 193, 196, 198, 199, 201, 202, 205, 210, 211, 250, 259, 264, 265, 277, 286, 291, 292, 306, 307, 309, 310, 313, 331, 340, 345, 346
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2024

Keywords

Examples

			The ternary representations of 7, 16, and 21 are 21, 121, and 210.
		

Crossrefs

Programs

  • Mathematica
    Map[#[[1]] &, Select[Map[{#, #[[1]] > 0 && #[[1]] == #[[2]] &[{Length[
    StringCases[#, "2"]], Length[StringCases[#, "21"]]}] &[
    IntegerString[#, 3]]} &, Range[500]], #[[2]] &]]
      (* Peter J. C. Moses, Mar 05 2024 *)