|
|
A106366
|
|
Necklaces with n beads of 4 colors, no 2 adjacent beads the same color.
|
|
3
|
|
|
4, 6, 8, 24, 48, 130, 312, 834, 2192, 5934, 16104, 44368, 122640, 341802, 956632, 2690844, 7596480, 21524542, 61171656, 174342216, 498112272, 1426419858, 4093181688, 11767920118, 33891544416, 97764131646, 282429537944
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
CycleBG transform of (4, 0, 0, 0, ...)
CycleBG transform T(A) = invMOEBIUS(invEULER(Carlitz(A)) + A(x^2) - A) + A.
Carlitz transform T(A(x)) has g.f. 1/(1-Sum_{k>0} (-1)^(k+1)*A(x^k)).
a(n) = (1/n) * Sum_{d | n} totient(n/d) * (3*(-1)^d + 3^d) for n > 1. - Andrew Howroyd, Mar 12 2017
|
|
MATHEMATICA
|
a[n_] := If[n==1, 4, Sum[EulerPhi[n/d]*(3*(-1)^d+3^d), {d, Divisors[n]}]/n ];
|
|
PROG
|
(PARI) a(n) = if(n==1, 4, sumdiv(n, d, eulerphi(n/d)*(3*(-1)^d + 3^d))/n); \\ Andrew Howroyd, Oct 14 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|