OFFSET
1,4
COMMENTS
Equivalently, black beads can be considered to have length 2, while all other beads have length 1.
Column k is the "CIK" (necklace, indistinct, unlabeled) transform of {k-1, 1, 0, 0, 0, ...} (see C. Bower link). - Andrew Howroyd, Jan 25 2024
LINKS
C. G. Bower, Transforms (2).
FORMULA
T(n,k) = (1/n) * Sum_{d|n} phi(n/d) * ((k-1)^d + Sum_{i=1..floor(d/2)} binomial(d-i-1,i-1) * d/i * (k-1)^(d-2*i)), where phi(n) = A000010.
G.f. of column k: Sum_{d>=1} (phi(d)/d) * log(1/(1 - (k-1)*x^d - x^(2*d))). - Andrew Howroyd, Jan 25 2024
EXAMPLE
n\k| 1 2 3 4 5 6 7 8 9 ...
---+-----------------------------------------------------------------
1 | 0 1 2 3 4 5 6 7 8 ...A001477
2 | 1 2 4 7 11 16 22 29 37 ...A000124
3 | 0 2 6 14 28 50 82 126 184 ...A033547
4 | 1 3 11 34 87 191 373 666 1109
5 | 0 3 18 81 276 759 1782 3717 7080
6 | 1 5 38 227 983 3301 9180 22163 47997
7 | 0 5 70 615 3500 14545 48210 135155 333400
8 | 1 8 151 1789 13007 66166 260113 844691 2370229
9 | 0 10 314 5206 48820 304970 1423790 5358934 17110376
10 | 1 15 684 15490 186195 1425453 7897006 34438104 125093109
...
PROG
(MATLAB)
function [res] = num2(n, k)
res=0;
for d=divisors(n)
s=(k-1)^d;
for i=1:floor(d/2)
s=s + nchoosek(d-i-1, i-1) * d/i * (k-1)^(d-2*i);
end
res= res + eulerPhi(n/d) * s;
end
res=res/n;
end
(PARI) T(n, k) = sum(d=1, n, eulerphi(d)*polcoef(log(1/(1 - (k-1)*x^d - x^(2*d)) + O(x*x^n)), n)/d) \\ Andrew Howroyd, Jan 25 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Maxim Karimov and Vladislav Sulima, Jan 25 2024
STATUS
approved