login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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.
FORMULA
a(n) = A007590(A005578(n+1)) - (A139598(A000975(n-2)) + A007590(A000975(n-1))).
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
Cf. A010060.
Sequence in context: A254216 A304940 A068205 * A254878 A247473 A113479
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Apr 27 2014
EXTENSIONS
Terms a(21) onward added by G. C. Greubel, Sep 28 2017
STATUS
approved