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.
%I A241684 #35 Sep 08 2022 08:46:07 %S A241684 0,0,4,8,32,120,464,1848,7312,29240,116624,466488,1864592,7458360, %T A241684 29827984,119311928,477225872,1908903480,7635526544,30542106168, %U A241684 122168075152,488672300600,1954687804304,7818751217208,31274999276432,125099997105720,500399966053264,2001599864213048 %N A241684 The total number of rectangles appearing in the Thue-Morse sequence logical matrices after n stages. %C A241684 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. %H A241684 G. C. Greubel, <a href="/A241684/b241684.txt">Table of n, a(n) for n = 0..1000</a> %H A241684 Kival Ngaokrajang, <a href="/A241684/a241684.pdf">Illustration of initial terms</a> %H A241684 Wikipedia, <a href="http://en.wikipedia.org/wiki/Thue%E2%80%93Morse_sequence">Thue-Morse sequence</a> %H A241684 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (4,5,-20,-4,16) %F A241684 a(n) = A007590(A005578(n+1)) - (A139598(A000975(n-2)) + A007590(A000975(n-1))). %F A241684 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 %F A241684 a(n) = (8 + 3*2^n + 2*4^n + (-1)^n*(24 - 2^n))/18, n>0. - _R. J. Mathar_, May 04 2014 %t A241684 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 *) %o A241684 (Small Basic) %o A241684 a[0] = 0 %o A241684 a[1] = 0 %o A241684 b = 1 %o A241684 For n = 0 To 20 %o A241684 If Math.Remainder(n+2,2) = 0 Then %o A241684 a[n+2] = 2*(a[n+1]*2-(4*b-4)) + 4*b %o A241684 b =b*4 - 2 %o A241684 Else %o A241684 a[n+2] = a[n+1]*4 - 8 %o A241684 EndIf %o A241684 TextWindow.Write(a[n]+", ") %o A241684 EndFor %o A241684 (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 %o A241684 (Magma) [(8+3*2^n+2*4^n+(-1)^n*(24-2^n))/18: n in [0..30]]; // _Vincenzo Librandi_, Sep 29 2017 %Y A241684 Cf. A010060. %K A241684 nonn,easy %O A241684 0,3 %A A241684 _Kival Ngaokrajang_, Apr 27 2014 %E A241684 Terms a(21) onward added by _G. C. Greubel_, Sep 28 2017