login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
1,1
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 ];
Array[a, 35] (* Jean-François Alcover, Jul 06 2018, after Andrew Howroyd *)
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
Column 4 of A208535.
Sequence in context: A063719 A272862 A361662 * A019160 A126233 A059889
KEYWORD
nonn
AUTHOR
Christian G. Bower, Apr 29 2005
STATUS
approved