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 A072130 #20 Aug 20 2025 10:57:49 %S A072130 0,1,5,14,37,99,260,681,1785,4674,12237,32039,83880,219601,574925, %T A072130 1505174,3940597,10316619,27009260,70711161,185124225,484661514, %U A072130 1268860317,3321919439,8696898000,22768774561,59609425685,156059502494 %N A072130 a(n+1) - 3*a(n) + a(n-1) = (2/3)*(1+w^(n+1)+w^(2*n+2)); a(1) = 0, a(2) = 1; where w is the cubic root of unity. %C A072130 w = exp(2*Pi*I/3) = (-1-sqrt(-3))/2. %C A072130 The sequence (2/3)*(1+w^(n+1)+w^(2*n+2)) is "Period 3: repeat [0,2,0]." %H A072130 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,1,-3,1). %F A072130 G.f.: x^2*(1+x)*(1+x-x^2)/((1-x)*(1-3*x+x^2)*(1+x+x^2)). - _Colin Barker_, Jan 14 2012 %F A072130 a(n) = 3*a(n-1)- a(n-2)+ a(n-3)-3*a(n-4)+a(n-5). - _Harvey P. Dale_, Aug 19 2012 %t A072130 a[1] = 0; a[2] = 1; w = Exp[2Pi*I/3]; a[n_] := (2/3)(1 + w^n + w^(2n)) + 3a[n - 1] - a[n - 2]; Table[ Simplify[ a[n]], {n, 1, 28}] %t A072130 LinearRecurrence[{3,-1,1,-3,1},{0,1,5,14,37},30] (* _Harvey P. Dale_, Aug 19 2012 *) %Y A072130 Cf. A071618. %K A072130 nonn,easy %O A072130 1,3 %A A072130 _Robert G. Wilson v_, Jun 24 2002