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-5 of 5 results.

A060372 p(n), positive part of n when n=p(n)-q(n) with p(n), q(n), p(n)+q(n) in A005836, integers written without 2 in base 3.

Original entry on oeis.org

0, 1, 3, 3, 4, 9, 9, 10, 9, 9, 10, 12, 12, 13, 27, 27, 28, 27, 27, 28, 30, 30, 31, 27, 27, 28, 27, 27, 28, 30, 30, 31, 36, 36, 37, 36, 36, 37, 39, 39, 40, 81, 81, 82, 81, 81, 82, 84, 84, 85, 81, 81, 82, 81, 81, 82, 84, 84, 85, 90, 90, 91, 90, 90, 91, 93, 93, 94, 81, 81, 82, 81
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Apr 02 2001

Keywords

Comments

The graphs of p(n), q(n) are fractals; the graph of p(n)+q(n) is Sierpiński-like.

Examples

			Example: 14=27-13=3^3 -(3^0+3^1+3^2), 16=28-12=3^3+3^0 -(3^1+3^2), 20=30-10=3^3+3^1 -(3^0+3^2); 27+13=28+12=30+10=40; 10,12,13, 27, 28, 30 are written without 2 in base 3.
		

Crossrefs

Programs

A343229 A binary encoding of the digits "-1" in balanced ternary representation of n.

Original entry on oeis.org

0, 0, 1, 0, 0, 3, 2, 2, 1, 0, 0, 1, 0, 0, 7, 6, 6, 5, 4, 4, 5, 4, 4, 3, 2, 2, 1, 0, 0, 1, 0, 0, 3, 2, 2, 1, 0, 0, 1, 0, 0, 15, 14, 14, 13, 12, 12, 13, 12, 12, 11, 10, 10, 9, 8, 8, 9, 8, 8, 11, 10, 10, 9, 8, 8, 9, 8, 8, 7, 6, 6, 5, 4, 4, 5, 4, 4, 3, 2, 2, 1, 0
Offset: 0

Views

Author

Rémy Sigrist, Apr 08 2021

Keywords

Comments

The ones in the binary representation of a(n) correspond to the digits "-1" in the balanced ternary representation of n.
We can extend this sequence to negative indices: a(-n) = A343228(n) for any n >= 0.

Examples

			The first terms, alongside the balanced ternary representation of n (with "T" instead of digits "-1") and the binary representation of a(n), are:
  n   a(n)  ter(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     1      1T          1
   3     0      10          0
   4     0      11          0
   5     3     1TT         11
   6     2     1T0         10
   7     2     1T1         10
   8     1     10T          1
   9     0     100          0
  10     0     101          0
  11     1     11T          1
  12     0     110          0
  13     0     111          0
  14     7    1TTT        111
  15     6    1TT0        110
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0, b=1, t); while (n, t=centerlift(Mod(n, 3)); if (t==-1, v+=b); n=(n-t)\3; b*=2); v }

Formula

a(n) = A289831(A060373(n)).

A060374 a(n)=p+q, where n=p-q and p, q, p+q are in A005836 (integers written without 2 in base 3).

Original entry on oeis.org

0, 1, 4, 3, 4, 13, 12, 13, 10, 9, 10, 13, 12, 13, 40, 39, 40, 37, 36, 37, 40, 39, 40, 31, 30, 31, 28, 27, 28, 31, 30, 31, 40, 39, 40, 37, 36, 37, 40, 39, 40, 121, 120, 121, 118, 117, 118, 121, 120, 121, 112, 111, 112, 109, 108, 109, 112, 111, 112, 121, 120, 121, 118
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Apr 02 2001

Keywords

Crossrefs

Programs

  • Haskell
    a060374 n = f $ dropWhile (< n) a005836_list where
       f (p:ps) | a039966 (p-n) == 1 && a039966 (2*p-n) == 1 = 2*p - n
                | otherwise                                  = f ps
    -- Reinhard Zumkeller, Sep 29 2011

Extensions

Definition clarified by Zoran Sunic, Feb 16 2006

A380180 Irregular table T(n, k), n >= 0, k = 1..2^A005812(n); the n-th row lists the integers m (possibly negative) such that the nonzero digits in the balanced ternary expansion of m appear in the balanced ternary expansion of n.

Original entry on oeis.org

0, 0, 1, -1, 0, 2, 3, 0, 3, 0, 1, 3, 4, -4, -3, -1, 0, 5, 6, 8, 9, -3, 0, 6, 9, -3, -2, 0, 1, 6, 7, 9, 10, -1, 0, 8, 9, 0, 9, 0, 1, 9, 10, -1, 0, 2, 3, 8, 9, 11, 12, 0, 3, 9, 12, 0, 1, 3, 4, 9, 10, 12, 13, -13, -12, -10, -9, -4, -3, -1, 0, 14, 15, 17, 18, 23, 24, 26, 27
Offset: 0

Views

Author

Rémy Sigrist, Jan 15 2025

Keywords

Comments

Every integer appears infinitely many times in the sequence.
See A368239 (resp. A380181) for the nonnegative values (resp. the nonpositive values, negated) in order of appearance in the present sequence.

Examples

			Irregular table T(n, k) begins:
  n   n-th row
  --  -------------------------
   0  0
   1  0, 1
   2  -1, 0, 2, 3
   3  0, 3
   4  0, 1, 3, 4
   5  -4, -3, -1, 0, 5, 6, 8, 9
   6  -3, 0, 6, 9
   7  -3, -2, 0, 1, 6, 7, 9, 10
   8  -1, 0, 8, 9
   9  0, 9
  10  0, 1, 9, 10
  11  -1, 0, 2, 3, 8, 9, 11, 12
  12  0, 3, 9, 12
.
Irregular table T(n, k) begins in balanced ternary:
  n    n-th row
  ---  --------------------------------
    0  0
    1  0, 1
   1T  T, 0, 1T, 10
   10  0, 10
   11  0, 1, 10, 11
  1TT  TT, T0, T, 0, 1TT, 1T0, 10T, 100
  1T0  T0, 0, 1T0, 100
  1T1  T0, T1, 0, 1, 1T0, 1T1, 100, 101
  10T  T, 0, 10T, 100
  100  0, 100
  101  0, 1, 100, 101
  11T  T, 0, 1T, 10, 10T, 100, 11T, 110
  110  0, 10, 100, 110
		

Crossrefs

See A380123 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], d, t = 1); while (n, d = centerlift(Mod(n, 3)); if (d, r = concat(r, [v + d*t | v <- r]);); n = (n-d)/3; t *= 3;); vecsort(r); }

Formula

T(n, 1) = - A060373(n).
T(n, 2^A005812(n)) = A060372(n).

A112952 Smaller of two ternary (base 3) numbers (each using only 0's and 1's, the latter's positions never coinciding) such that the decimal representation of their difference is n.

Original entry on oeis.org

0, 0, 1, 0, 0, 11, 10, 10, 1, 0, 0, 1, 0, 0, 111, 110, 110, 101, 100, 100, 101, 100, 100, 11, 10, 10, 1, 0, 0, 1, 0, 0, 11, 10, 10, 1, 0, 0, 1, 0, 0, 1111, 1110, 1110, 1101, 1100, 1100, 1101, 1100, 1100, 1011, 1010, 1010, 1001, 1000, 1000, 1001, 1000, 1000, 1011, 1010
Offset: 0

Views

Author

Lekraj Beedassy, Jan 12 2006

Keywords

Comments

Base 3 representation of A060373. For the larger number see A112867. Any number is expressible as a unique combination of powers of 3 in the form +/- 3^0 +/- 3^1 +/- 3^2 +/- 3^3 ...(Related to Bachet's Weight Problem).
Showing 1-5 of 5 results.