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.

A292779 Interpret the values of the Moebius function mu(k) for k = n to 1 as a balanced ternary number.

Original entry on oeis.org

1, -2, -11, -11, -92, 151, -578, -578, -578, 19105, -39944, -39944, -571385, 1022938, 5805907, 5805907, -37240814, -37240814, -424661303, -424661303, 3062123098, 13522476301, -17858583308, -17858583308, -17858583308, 829430026135, 829430026135, 829430026135
Offset: 1

Views

Author

Alonso del Arte, Sep 22 2017

Keywords

Comments

Balanced ternary is much like regular ternary, but with the crucial difference of using the digit -1 instead of the digit 2. Then some powers of 3 are added, others are subtracted.
Since the least significant digit is always 1, a(n) is never a multiple of 3.
If mu(n) = 0, then a(n) is the same as a(n - 1).
Run lengths are given by A076259. - Andrey Zabolotskiy, Oct 13 2017

Examples

			mu(1) = 1, so a(1) = 1 * 3^0 = 1.
mu(2) = -1, so a(2) = -1 * 3^1 + 1 * 3^0 = -3 + 1 = -2.
mu(3) = -1, so a(3) = -1 * 3^2 + -1 * 3^1 + 1 * 3^0 = -9 - 3 + 1 = -11.
mu(4) = 0, so a(4) = 0 * 3^3 + -1 * 3^2 + -1 * 3^1 + 1 * 3^0 = -9 - 3 + 1 = -11.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          a(n-1)+3^(n-1)*numtheory[mobius](n))
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Oct 13 2017
  • Mathematica
    Table[3^Range[0, n - 1].MoebiusMu[Range[n]], {n, 50}]
  • PARI
    a(n) = sum(k=1, n, moebius(k)*3^(k-1)); \\ Michel Marcus, Oct 01 2017

Formula

a(n) = Sum_{k = 1 .. n} mu(k) 3^(k - 1).