cp's OEIS Frontend

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.

A052938 Expansion of (1 + 2*x - 2*x^2)/( (1+x)*(1-x)^2 ).

This page as a plain text file.
%I A052938 #47 Jul 02 2025 16:01:58
%S A052938 1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,10,9,11,10,12,11,13,12,14,13,15,14,16,
%T A052938 15,17,16,18,17,19,18,20,19,21,20,22,21,23,22,24,23,25,24,26,25,27,26,
%U A052938 28,27,29,28,30,29,31,30,32,31,33,32,34,33,35,34,36,35,37,36,38,37,39
%N A052938 Expansion of (1 + 2*x - 2*x^2)/( (1+x)*(1-x)^2 ).
%H A052938 Reinhard Zumkeller, <a href="/A052938/b052938.txt">Table of n, a(n) for n = 0..10000</a>
%H A052938 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=929">Encyclopedia of Combinatorial Structures 929</a>
%H A052938 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F A052938 G.f.: (1+2*x-2*x^2)/((1+x)*(1-x)^2).
%F A052938 a(n) = -a(n-1) + n + 3, with a(0)=1.
%F A052938 a(n) = (3*(-1)^(n+1) + 2*n + 7)/4.
%F A052938 A112034(n) = 3*2^a(n); a(n) = A109613(n+2) - A084964(n). - _Reinhard Zumkeller_, Aug 27 2005
%F A052938 a(n) = A035106(n+3) - A035106(n+2). - _Reinhard Zumkeller_, Oct 06 2015
%F A052938 a(n) = A060762(n+1) - 1. - _Filip Zaludek_, Nov 19 2016
%F A052938 E.g.f.: ((5+x)*sinh(x) + (2+x)*cosh(x))/2. - _G. C. Greubel_, Oct 18 2019
%p A052938 spec := [S,{S=Prod(Union(Sequence(Z),Z,Z),Sequence(Prod(Z,Z)))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
%p A052938 seq((2*n+7-3*(-1)^n)/4, n=0..30); # _G. C. Greubel_, Oct 18 2019
%t A052938 LinearRecurrence[{1,1,-1},{1,3,2},80] (* _Harvey P. Dale_, Apr 10 2019 *)
%o A052938 (PARI) a(n)=([0,1,0; 0,0,1; -1,1,1]^n*[1;3;2])[1,1] \\ _Charles R Greathouse IV_, Sep 02 2015
%o A052938 (Haskell)
%o A052938 a052938 n = a052938_list !! n
%o A052938 a052938_list = 1 : 3 : 2 : zipWith (-) [5..] a052938_list
%o A052938 -- _Reinhard Zumkeller_, Oct 06 2015
%o A052938 (Magma) [(2*n+7-3*(-1)^n)/4: n in [0..30]]; // _G. C. Greubel_, Oct 18 2019
%o A052938 (Magma) R<x>:=PowerSeriesRing(Integers(), 75); Coefficients(R!( (1 + 2*x - 2*x^2)/( (1+x)*(1-x)^2 ))); // _Marius A. Burtea_, Oct 18 2019
%o A052938 (Sage) [(2*n+7-3*(-1)^n)/4 for n in (0..30)] # _G. C. Greubel_, Oct 18 2019
%o A052938 (GAP) List([0..30], n-> (2*n+7-3*(-1)^n)/4); # _G. C. Greubel_, Oct 18 2019
%Y A052938 Cf. A028242 (same sequence with 1,0,2 prefix).
%Y A052938 Cf. A035106.
%K A052938 easy,nonn
%O A052938 0,2
%A A052938 encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E A052938 More terms from _James Sellers_, Jun 06 2000