|
|
A241684
|
|
The total number of rectangles appearing in the Thue-Morse sequence logical matrices after n stages.
|
|
4
|
|
|
0, 0, 4, 8, 32, 120, 464, 1848, 7312, 29240, 116624, 466488, 1864592, 7458360, 29827984, 119311928, 477225872, 1908903480, 7635526544, 30542106168, 122168075152, 488672300600, 1954687804304, 7818751217208, 31274999276432, 125099997105720, 500399966053264, 2001599864213048
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(n) is the total number of non-isolated "1s" (consecutive 1s on 2 rows, 1 column or 1 row, 2 columns) that appear as rectangles in the Thue-Morse logical matrices after n stages. See links for more details.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: -4*x^2*(8*x^3-5*x^2-2*x+1) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)*(4*x-1)). - Colin Barker, Apr 27 2014
a(n) = (8 + 3*2^n + 2*4^n + (-1)^n*(24 - 2^n))/18, n>0. - R. J. Mathar, May 04 2014
|
|
MATHEMATICA
|
CoefficientList[Series[-4*x^2*(8*x^3 - 5*x^2 - 2*x + 1)/((x - 1)*(x + 1)*(2*x - 1)*(2*x + 1)*(4*x - 1)), {x, 0, 50}], x] (* G. C. Greubel, Sep 28 2017 *)
|
|
PROG
|
(Small Basic)
a[0] = 0
a[1] = 0
b = 1
For n = 0 To 20
If Math.Remainder(n+2, 2) = 0 Then
a[n+2] = 2*(a[n+1]*2-(4*b-4)) + 4*b
b =b*4 - 2
Else
a[n+2] = a[n+1]*4 - 8
EndIf
TextWindow.Write(a[n]+", ")
EndFor
(PARI) x='x+O('x^50); concat([0, 0], Vec(-4*x^2*(8*x^3-5*x^2-2*x+1)/((x-1)*(x+1)*(2*x-1)*(2*x+1)*(4*x-1)))) \\ G. C. Greubel, Sep 28 2017
(Magma) [(8+3*2^n+2*4^n+(-1)^n*(24-2^n))/18: n in [0..30]]; // Vincenzo Librandi, Sep 29 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|