A090225 T(n,k) = Points in n-dimensional lattice of side length k with at least one coordinate = k and GCD of all coordinates = 1.
0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 7, 0, 0, 0, 4, 12, 15, 0, 0, 0, 4, 30, 50, 31, 0, 0, 0, 8, 42, 160, 180, 63, 0, 0, 0, 4, 84, 304, 750, 602, 127, 0, 0, 0, 12, 78, 656, 1890, 3304, 1932, 255, 0, 0, 0, 8, 162, 880, 4620, 10864, 14070, 6050, 511, 0, 0, 0, 12, 156, 1680, 8070
Offset: 0
Examples
T(3,2) = 12 because of the six permutations of (2,1,0) and three each of (2,1,1) and (2,2,1). 0; 0, 0; 0, 1, 0; 0, 0, 3, 0; 0, 0, 2, 7, 0; 0, 0, 4, 12, 15, 0; 0, 0, 4, 30, 50, 31, 0; 0, 0, 8, 42,160,180, 63, 0; 0, 0, 4, 84,304,750,602,127, 0; 0, 0, 12, 78,656,1890,3304,1932,255, 0;
Crossrefs
Cf. A090030.
Programs
-
Mathematica
aux[n_, k_] := If[k == 0, 0, (k + 1)^n - k^n - Sum[aux[n, Divisors[k][[i]]], {i, 1, Length[Divisors[k]] - 1}]]
Formula
T(n, 0) = 0; T(n, k) = (k+1)^n - k^n - sum T(n, divisors of k)