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.

Showing 1-1 of 1 results.

A350776 Nonnegative integers whose balanced ternary expansion has no two consecutive nonzero digits.

Original entry on oeis.org

0, 1, 3, 8, 9, 10, 24, 26, 27, 28, 30, 71, 72, 73, 78, 80, 81, 82, 84, 89, 90, 91, 213, 215, 216, 217, 219, 233, 234, 235, 240, 242, 243, 244, 246, 251, 252, 253, 267, 269, 270, 271, 273, 638, 639, 640, 645, 647, 648, 649, 651, 656, 657, 658, 699, 701, 702
Offset: 1

Views

Author

Rémy Sigrist, Jan 15 2022

Keywords

Comments

This sequence is to balanced ternary what A328727 is to ternary.

Examples

			The first terms, in decimal and in balanced ternary, are:
  n   a(n)  bter(n)
  --  ----  -------
   1     0        0
   2     1        1
   3     3       10
   4     8      10T
   5     9      100
   6    10      101
   7    24     10T0
   8    26     100T
   9    27     1000
  10    28     1001
  11    30     1010
  12    71    10T0T
		

Crossrefs

Programs

  • PARI
    is(n) = { my (p=0, d); while (n, d=[0, 1, -1][1+n%3]; if (p && d, return (0), n=(n-d)/3; p=d)); 1 }

Formula

A350775(n) = 0 iff n belongs to the present sequence.
Showing 1-1 of 1 results.