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 A371668 #5 Apr 02 2024 11:44:07 %S A371668 0,1,1,1,5,11,19,43,93,181,371,771,1547,3121,6357,12821,25805,52123, %T A371668 105031,211243,425215,855457,1719257,3455153,6942387,13942111, %U A371668 27993317,56197117,112785797,226311535,454043339,910778203,1826666093,3663122277,7344953123 %N A371668 Number of binary necklaces of length n which have more 00 than 01 substrings. %F A371668 a(n) = 2^n - A217464(n) - A371570(n). %F A371668 a(n) = (8*(n-7)*a(n-7) + 4*(29-5*n)*a(n-6) + (26*n-110)*a(n-5) + (77-23*n)*a(n-4) + (15*n-46)*a(n-3) + (22-10*n)*a(n-2) + 5*(n-1)*a(n-1))/n for n>=7. %e A371668 a(3) = 1: 000. %e A371668 a(4) = 5: 0000, 0001, 0010, 0100, 1000. %e A371668 a(5) = 11: 00000, 00001, 00010, 00011, 00100, 00110, 01000, 01100, 10000, 10001, 11000. %t A371668 tup[n_] := Tuples[{0, 1}, n]; %t A371668 tupToNec[n_] := Map[Append[#, #[[1]]] &, tup[n]]; %t A371668 cou[lst_List] := Count[lst, {0, 0}] > Count[lst, {0, 1}]; %t A371668 par[lst_List] := Partition[lst, 2, 1]; %t A371668 a[0] = 0; %t A371668 a[n_] := a[n] = Map[cou, Map[par, tupToNec[n]]] // Boole // Total; %t A371668 Monitor[Table[a[n], {n, 0, 18}], {n, Table[a[m], {m, 0, n - 1}]}] %Y A371668 Cf. A217464 (necklaces with equal 00 and 01), A371570 (necklaces with more 01 than 00). %Y A371668 Cf. A126869 (necklaces with equal 00 and 11, for n>=1), A058622 (necklaces with more 00 than 11). %Y A371668 Cf. A163493 (strings with equal 00 and 01), A371358 (strings with more 00 than 01), A371564 (strings with more 01 than 00). %K A371668 nonn %O A371668 0,5 %A A371668 _Robert P. P. McKone_, Apr 02 2024