A292779 Interpret the values of the Moebius function mu(k) for k = n to 1 as a balanced ternary number.
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
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.
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..1000
- Wikipedia, Balanced ternary
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).
Comments