A206706 Triangle read by rows, T(n,k) n>=0, 0<=k<=n; T(0,0) = -1 and for n > 0 T(n,k) = moebius(n,k+1) - moebius(n,k) where moebius(n,k) = mu(floor(n/k)) if k<>0 and k divides n, 0 otherwise; mu=A008683.
-1, 1, -1, -1, 2, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 0, 0, 1, -1, 1, -2, 0, 1, 0, 1, -1, -1, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, -1, 1, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 0, 0, 1, -1, 1, -2, 1, 0, -1, 1, 0, 0, 0, 1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0
Offset: 0
Examples
[ 0] -1, [ 1] 1, -1, [ 2] -1, 2, -1, [ 3] -1, 1, 1, -1, [ 4] 0, -1, 1, 1, -1, [ 5] -1, 1, 0, 0, 1, -1, [ 6] 1, -2, 0, 1, 0, 1, -1, [ 7] -1, 1, 0, 0, 0, 0, 1, -1, [ 8] 0, 0, 0, -1, 1, 0, 0, 1, -1, [ 9] 0, 0, -1, 1, 0, 0, 0, 0, 1, -1, The inverse of this triangle as a matrix begins [-1, 0, 0, 0, 0, 0, 0] [-1, -1, 0, 0, 0, 0, 0] [-1, -2, -1, 0, 0, 0, 0] [-1, -3, -1, -1, 0, 0, 0] [-1, -4, -2, -1, -1, 0, 0] [-1, -5, -2, -1, -1, -1, 0] [-1, -6, -3, -2, -1, -1, -1]
Programs
-
Maple
with(numtheory): A206706 := proc(n,k) local moebius; moebius := (n, k) -> `if`(k<>0 and irem(n,k) = 0, mobius(iquo(n,k)), 0); moebius(n, k+1) - moebius(n, k) end:
-
Mathematica
mu[n_, k_] := If[k != 0 && Divisible[n, k], MoebiusMu[n/k], 0]; T[0, 0] = -1; T[n_, k_] /; 0 <= k <= n := mu[n, k+1] - mu[n, k]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 12 2019 *)
-
Sage
def mur(n,k): return moebius(n//k) if k != 0 and n%k == 0 else 0 def A206706(n,k) : return -1 if n==0 and k==0 else mur(n,k+1) - mur(n,k)
Comments