A241685 The total number of squares and rectangles appearing in the Thue-Morse sequence logical matrices after n stages.
0, 2, 4, 18, 60, 242, 924, 3698, 14620, 58482, 233244, 932978, 3729180, 14916722, 59655964, 238623858, 954451740, 3817806962, 15271053084, 61084212338, 244336150300, 977344601202, 3909375608604
Offset: 0
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Kival Ngaokrajang, Illustration of initial terms
- Kival Ngaokrajang, Illustration for n = 6
- Wikipedia, Thue-Morse sequence
- Index entries for linear recurrences with constant coefficients, signature (4, 5, -20, -4, 16).
Crossrefs
Cf. A010060.
Programs
-
Mathematica
Table[Floor[(2^(n + 2) + 3 - (-1)^n)^2/72], {n, 0, 50}] (* G. C. Greubel, Sep 29 2017 *)
-
PARI
{for (n=1,50, b=(2^(n+1)+3+(-1)^n)/6; a=floor(b^2/2); print1(a,","))}
Formula
Empirical g.f.: -2*x*(4*x^3-4*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) = floor((2^(n + 2) + 3 - (-1)^n)^2/72). - G. C. Greubel, Sep 29 2017
Comments