This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A106366 #23 Apr 22 2025 02:47:44 %S A106366 4,6,8,24,48,130,312,834,2192,5934,16104,44368,122640,341802,956632, %T A106366 2690844,7596480,21524542,61171656,174342216,498112272,1426419858, %U A106366 4093181688,11767920118,33891544416,97764131646,282429537944 %N A106366 Number of necklaces with n beads of 4 colors, no 2 adjacent beads the same color. %H A106366 Andrew Howroyd, <a href="/A106366/b106366.txt">Table of n, a(n) for n = 1..200</a> %H A106366 <a href="/index/Ne#necklaces">Index entries for sequences related to necklaces</a> %F A106366 CycleBG transform of (4, 0, 0, 0, ...) %F A106366 CycleBG transform T(A) = invMOEBIUS(invEULER(Carlitz(A)) + A(x^2) - A) + A. %F A106366 Carlitz transform T(A(x)) has g.f. 1/(1-Sum_{k>0} (-1)^(k+1)*A(x^k)). %F A106366 a(n) = (1/n) * Sum_{d | n} totient(n/d) * (3*(-1)^d + 3^d) for n > 1. - _Andrew Howroyd_, Mar 12 2017 %t A106366 a[n_] := If[n==1, 4, Sum[EulerPhi[n/d]*(3*(-1)^d+3^d), {d, Divisors[n]}]/n ]; %t A106366 Array[a, 35] (* _Jean-François Alcover_, Jul 06 2018, after _Andrew Howroyd_ *) %o A106366 (PARI) a(n) = if(n==1, 4, sumdiv(n, d, eulerphi(n/d)*(3*(-1)^d + 3^d))/n); \\ _Andrew Howroyd_, Oct 14 2017 %Y A106366 Column 4 of A208535. %Y A106366 Cf. A000031, A001868, A226493. %K A106366 nonn %O A106366 1,1 %A A106366 _Christian G. Bower_, Apr 29 2005