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 A120908 #23 Jul 14 2023 11:25:57 %S A120908 0,4,24,108,432,1620,5832,20412,69984,236196,787320,2598156,8503056, %T A120908 27634932,89282088,286978140,918330048,2927177028,9298091736, %U A120908 29443957164,92980917360,292889889684,920511081864,2887057484028 %N A120908 Sum of the lengths of the drops in all ternary words of length n on {0,1,2}. The drops of a ternary word on {0,1,2} are the subwords 10,20 and 21, their lengths being the differences 1, 2 and 1, respectively. %C A120908 a(n) = 4*A027471(n). %C A120908 a(n) = Sum_{k>=0} k*A120907(n,k). %H A120908 Vincenzo Librandi, <a href="/A120908/b120908.txt">Table of n, a(n) for n = 1..400</a> %H A120908 Franck Ramaharo, <a href="https://arxiv.org/abs/1802.07701">Statistics on some classes of knot shadows</a>, arXiv:1802.07701 [math.CO], 2018. %H A120908 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6,-9). %F A120908 a(n) = 4*(n-1)*3^(n-2). %F A120908 G.f.: 4*z^2/(1-3*z)^2. %e A120908 a(2)=4 because the ternary words 00,01,02,11,12 and 22 have no drops, each of the words 10 and 21 has one drop of length 1 and the word 20 has one drop of length 2. %p A120908 seq(4*(n-1)*3^(n-2),n=1..27); %t A120908 Table[4*(n-1)*3^(n-2), {n, 30}] (* _Wesley Ivan Hurt_, Jan 28 2014 *) %t A120908 LinearRecurrence[{6,-9},{0,4},30] (* _Harvey P. Dale_, Jul 14 2023 *) %o A120908 (Magma) [4*(n-1)*3^(n-2): n in [1..30]]; // _Vincenzo Librandi_, Jun 09 2011 %o A120908 (PARI) a(n) = 4*(n-1)*3^(n-2); \\ _Altug Alkan_, May 16 2018 %Y A120908 Cf. A027471, A120906, A120907. %K A120908 nonn,easy %O A120908 1,2 %A A120908 _Emeric Deutsch_, Jul 15 2006