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 A134172 #14 May 30 2016 06:57:55 %S A134172 0,0,1,2,1,1,4,5,2,2,7,8,3,3,10,11,4,4,13,14,5,5,16,17,6,6,19,20,7,7, %T A134172 22,23,8,8,25,26,9,9,28,29,10,10,31,32,11,11,34,35,12,12,37,38,13,13, %U A134172 40,41,14,14,43,44,15,15,46,47,16,16,49,50,17,17,52,53,18,18,55,56,19,19,58 %N A134172 Expansion of x^2*(1+x)*(1-x+x^2) / ((1-x)^2*(1+x^2)^2). %C A134172 Old definition was: "Starting with 0, 1, 2, 3, ... (A001477), write 0, 0 instead of a(0), 1, 1 instead of a(3) and in general n, n instead of a(3n)". %H A134172 G. C. Greubel, <a href="/A134172/b134172.txt">Table of n, a(n) for n = 0..1000</a> %H A134172 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,-3,4,-3,2,-1). %F A134172 From _Colin Barker_, May 30 2016: (Start) %F A134172 G.f.: x^2*(1+x)*(1-x+x^2) / ((1-x)^2*(1+x^2)^2). %F A134172 a(n) = (-2+(-i)^n+i^n+(4-(1+i)*(-i)^n-(1-i)*i^n)*n)/8 where i = sqrt(-1). %F A134172 a(n) = 2*a(n-1)-3*a(n-2)+4*a(n-3)-3*a(n-4)+2*a(n-5)-a(n-6) for n>5. (End) %t A134172 LinearRecurrence[{2, -3, 4, -3, 2, -1}, {0, 0, 1, 2, 1, 1}, 50] (* _G. C. Greubel_, May 29 2016 *) %o A134172 (PARI) concat(vector(2), Vec(x^2*(1+x)*(1-x+x^2)/((1-x)^2*(1+x^2)^2) + O(x^50))) \\ _Colin Barker_, May 30 2016 %K A134172 nonn,easy %O A134172 0,4 %A A134172 _Paul Curtz_, Jan 13 2008 %E A134172 New name using the g.f. from _Colin Barker_, May 30 2016