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 A157241 #32 May 22 2019 10:04:11 %S A157241 0,1,3,3,-5,-21,-21,43,171,171,-341,-1365,-1365,2731,10923,10923, %T A157241 -21845,-87381,-87381,174763,699051,699051,-1398101,-5592405,-5592405, %U A157241 11184811,44739243,44739243,-89478485,-357913941 %N A157241 Expansion of x / ((1-x)*(4*x^2-2*x+1)). %C A157241 Generating floretion is Y = .5('i + 'j + 'k + i' + j' + k') + ee. ("ibasek"). This is the same floretion which generates A157240. %H A157241 Colin Barker, <a href="/A157241/b157241.txt">Table of n, a(n) for n = 0..1000</a> %H A157241 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-6,4). %F A157241 a(n+1) - a(n) = A088138(n+1). %F A157241 a(n+1) = Sum_{k=0..n} A120987(n,k)*(-1)^(n-k). - _Philippe Deléham_, Oct 25 2011 %F A157241 G.f.: 2*x-2*x/(G(0) + 1) where G(k)= 1 + 2*(2*k+3)*x/(2*k+1 - 2*x*(k+2)*(2*k+1)/(2*x*(k+2) + (k+1)/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Nov 23 2012 %F A157241 a(n) = 1/9*(3 + (-1)^floor((n-2)/3)*2^(4+3*floor((n-2)/3)) + (-1)^floor((n-1)/3)*2^(3+3*floor((n-1)/3))). - _John M. Campbell_, Dec 23 2016 %F A157241 From _Colin Barker_, May 22 2019: (Start) %F A157241 a(n) = (2 - (1+i*sqrt(3))^(1+n) + i*(1-i*sqrt(3))^n*(i+sqrt(3))) / 6 where i=sqrt(-1). %F A157241 a(n) = 3*a(n-1) - 6*a(n-2) + 4*a(n-3) for n>2. %F A157241 (End) %t A157241 CoefficientList[Series[x/((1-x)(4x^2-2x+1)),{x,0,40}],x] (* or *) LinearRecurrence[{3,-6,4},{0,1,3},40] (* _Harvey P. Dale_, Oct 27 2013 *) %t A157241 Table[1/9 (3 + (-1)^Floor[1/3 (-2 + n)] 2^(4 + 3 Floor[1/3 (-2 + n)]) + (-1)^Floor[1/3 (-1 + n)] 2^(3 + 3 Floor[1/3 (-1 + n)])), {n, 0, 500}] (* _John M. Campbell_, Dec 23 2016 *) %o A157241 (PARI) concat(0, Vec(x / ((1 - x)*(1 - 2*x + 4*x^2)) + O(x^40))) \\ _Colin Barker_, May 22 2019 %Y A157241 Cf. A128018, A157240. %K A157241 easy,sign %O A157241 0,3 %A A157241 _Creighton Dement_, Feb 25 2009