A187767 Number of bicolored cyclic patterns n X n.
0, 2, 3, 10, 15, 35, 63, 138, 255, 527, 1023, 2083, 4095, 8255, 16383, 32906, 65535, 131327, 262143, 524815, 1048575, 2098175, 4194303, 8390691, 16777215, 33558527, 67108863, 134225983, 268435455, 536887295, 1073741823, 2147516554, 4294967295, 8590000127, 17179869183
Offset: 1
Keywords
Examples
a(4)=10 is represented below. See Links for more examples. . 1000 0100 0010 0001 0101 1010 1001 0110 1100 0011 . 0100 0001 0100 0001 0101 0101 1100 1100 0011 0011 . 0010 0100 1000 0001 0101 1010 0110 1001 1100 0011 . 0001 0001 0001 0001 0101 0101 0011 0011 0011 0011
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..200
- Giovanni Resta, Picture explaining sequence definition.
- Giovanni Resta, Pictures for a(2)-a(7).
- Giovanni Resta, Pictures for a(8) and a(9).
Crossrefs
Programs
-
Mathematica
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]]; (*count*) a[n_] := Length@cyPatt@n; Print["Seq = ",a/@Range[12]]; (*show*) showP[p_] := GraphicsGrid@Partition[ArrayPlot/@p,8,8,1,Null]; showP[cyPatt[6]]
-
PARI
b(n)=sumdiv(n,d,(d%2)*(moebius(d)*2^(n/d)))/(2*n); a(n)=sumdiv(n,d,d*b(d)) - 1; \\ Andrew Howroyd, Jun 02 2017
Formula
a(1) = 0; a(n) = 2^(n-1)-1 if n is odd, 2^(n-1)+a(n/2) if n is even (conjectured).
a(n) = -1 + Sum_{d|n} d*A000048(d). - Andrew Howroyd, Jun 02 2017
Extensions
a(22)-a(35) from Andrew Howroyd, Jun 02 2017
Comments