OFFSET
1,2
COMMENTS
Number of primitive (period n) periodic palindromes of length n using a maximum of k different symbols.
REFERENCES
M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1275
FORMULA
T(n, k) = Sum_{d | n} mu(n/d) * A284855(d, k).
EXAMPLE
Table starts:
1 2 3 4 5 6 7 8 9 10 ...
0 1 3 6 10 15 21 28 36 45 ...
0 2 6 12 20 30 42 56 72 90 ...
0 3 12 30 60 105 168 252 360 495 ...
0 6 24 60 120 210 336 504 720 990 ...
0 7 42 138 340 705 1302 2212 3528 5355 ...
0 14 78 252 620 1290 2394 4088 6552 9990 ...
0 18 144 600 1800 4410 9408 18144 32400 54450 ...
0 28 234 1008 3100 7740 16758 32704 58968 99900 ...
0 39 456 2490 9240 26985 66864 146916 294480 548955 ...
...
MATHEMATICA
b[d_, k_] := If[EvenQ[d], (k^(d/2) + k^(d/2 + 1))/2, k^((d + 1)/2)];
a[n_, k_] := DivisorSum[n, MoebiusMu[n/#] b[#, k] &];
Table[a[n - k + 1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jun 06 2017, translated from PARI *)
PROG
(PARI)
b(d, k) = if(d % 2 == 0, (k^(d/2) + k^(d/2+1))/2, k^((d+1)/2));
a(n, k) = sumdiv(n, d, moebius(n/d) * b(d, k));
for(n=1, 10, for(k=1, 10, print1( a(n, k), ", "); ); print(); );
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Andrew Howroyd, Apr 04 2017
STATUS
approved