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 A238531 #20 Sep 08 2022 08:46:07 %S A238531 1,1,3,5,8,12,17,23,30,38,47,57,68,80,93,107,122,138,155,173,192,212, %T A238531 233,255,278,302,327,353,380,408,437,467,498,530,563,597,632,668,705, %U A238531 743,782,822,863,905,948,992,1037,1083,1130,1178,1227,1277,1328,1380 %N A238531 Expansion of (1 - x + x^2)^2 / (1 - x)^3 in powers of x. %C A238531 Essentially the same as A152948, A133263 and A089071. - _R. J. Mathar_, Mar 30 2014 %H A238531 G. C. Greubel, <a href="/A238531/b238531.txt">Table of n, a(n) for n = 0..2500</a> %H A238531 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1). %F A238531 Euler transform of length 6 sequence [1, 2, 2, 0, 0, -2]. %F A238531 Binomial transform of [1, 0, 2, -2, 3, -4, 5, -6, ...]. %F A238531 a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. %F A238531 G.f.: (1 - x + x^2)^2 / (1 - x)^3. %F A238531 a(n) = a(1 - n) for all n in Z. %F A238531 a(n + 1) = A133263(n) if n>=0. a(n) = (n^2 - n) / 2 + 2 unless n=0 or n=1. %F A238531 (1 + x^2 + x^3 + x^4 + ...)*(1 + x + 2x^2 + 3x^3 + 4x^4 + ...) = (1 + x + 3x^2 + 5x^3 + 8x^4 + 12x^5 + ...). - _Gary W. Adamson_, Jul 27 2010 %e A238531 G.f. = 1 + x + 3*x^2 + 5*x^3 + 8*x^4 + 12*x^5 + 17*x^6 + 23*x^7 + 30*x^8 + ... %t A238531 a[ n_] := (n^2 - n) / 2 + If[ n == 0 || n == 1, 1, 2]; %t A238531 CoefficientList[Series[(1-x+x^2)^2/(1-x)^3, {x, 0, 50}], x] (* _G. C. Greubel_, Aug 07 2018 *) %o A238531 (PARI) {a(n) = (n^2 - n) / 2 + 2 - (n==0) - (n==1)}; %o A238531 (PARI) {a(n) = if( n<0, n = 1-n); polcoeff( (1 - x + x^2)^2 / (1 - x)^3 + x * O(x^n), n)}; %o A238531 (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+x^2)^2/(1-x)^3)); // _G. C. Greubel_, Aug 07 2018 %Y A238531 Cf. A133263. %K A238531 nonn,easy %O A238531 0,3 %A A238531 _Michael Somos_, Feb 28 2014