cp's OEIS Frontend

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.

A187767 Number of bicolored cyclic patterns n X n.

This page as a plain text file.
%I A187767 #14 Jun 02 2017 12:28:59
%S A187767 0,2,3,10,15,35,63,138,255,527,1023,2083,4095,8255,16383,32906,65535,
%T A187767 131327,262143,524815,1048575,2098175,4194303,8390691,16777215,
%U A187767 33558527,67108863,134225983,268435455,536887295,1073741823,2147516554,4294967295,8590000127,17179869183
%N A187767 Number of bicolored cyclic patterns n X n.
%C A187767 A bicolored cyclic pattern is a 0-1 n x n matrix where the j-th row is equal to the first row rotated to the left by (j-1)*k places, with 1 <= k <= n a parameter. For example, with first row = 0110 we have
%C A187767 .
%C A187767 . (k=1) 0 1 1 0  (k=2) 0 1 1 0  (k=3) 0 1 1 0  (k=4) 0 1 1 0
%C A187767 .       1 1 0 0        1 0 0 1        0 0 1 1        0 1 1 0
%C A187767 .       1 0 0 1        0 1 1 0        1 0 0 1        0 1 1 0
%C A187767 .       0 0 1 1        1 0 0 1        1 1 0 0        0 1 1 0
%C A187767 The (2^n-2)*n matrices so obtained are reduced considering equivalent those obtained exchanging 0's and 1's and those which produce the same pattern, apart translation.
%H A187767 Andrew Howroyd, <a href="/A187767/b187767.txt">Table of n, a(n) for n = 1..200</a>
%H A187767 Giovanni Resta, <a href="/A187767/a187767.png">Picture explaining sequence definition.</a>
%H A187767 Giovanni Resta, <a href="/A187767/a187767_1.png">Pictures for a(2)-a(7).</a>
%H A187767 Giovanni Resta, <a href="/A187767/a187767_2.png">Pictures for a(8) and a(9).</a>
%F A187767 a(1) = 0; a(n) = 2^(n-1)-1 if n is odd, 2^(n-1)+a(n/2) if n is even (conjectured).
%F A187767 a(n) = -1 + Sum_{d|n} d*A000048(d). - _Andrew Howroyd_, Jun 02 2017
%e A187767 a(4)=10 is represented below. See Links for more examples.
%e A187767 . 1000 0100 0010 0001 0101 1010 1001 0110 1100 0011
%e A187767 . 0100 0001 0100 0001 0101 0101 1100 1100 0011 0011
%e A187767 . 0010 0100 1000 0001 0101 1010 0110 1001 1100 0011
%e A187767 . 0001 0001 0001 0001 0101 0101 0011 0011 0011 0011
%t A187767 cyPatt[n_]:=Block[{b,c},c[v_,q_:1]:=Table[RotateLeft[v,i q],{i,n}]; b=Union[(First@Union[c@#,c[1-#]])& /@ IntegerDigits[Range[2^n/2-1], 2,n]]; Union@Flatten[Table[c[e,j],{j,n},{e,b}],1]];
%t A187767 (*count*) a[n_] := Length@cyPatt@n; Print["Seq = ",a/@Range[12]];
%t A187767 (*show*) showP[p_] := GraphicsGrid@Partition[ArrayPlot/@p,8,8,1,Null];
%t A187767 showP[cyPatt[6]]
%o A187767 (PARI)
%o A187767 b(n)=sumdiv(n,d,(d%2)*(moebius(d)*2^(n/d)))/(2*n);
%o A187767 a(n)=sumdiv(n,d,d*b(d)) - 1; \\ _Andrew Howroyd_, Jun 02 2017
%Y A187767 The number of patterns made of vertical stripes only is A056295(n).
%Y A187767 Cf. A000048, A056303, A127804.
%K A187767 nonn
%O A187767 1,2
%A A187767 _Giovanni Resta_, Jan 04 2013
%E A187767 a(22)-a(35) from _Andrew Howroyd_, Jun 02 2017