login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238531 Expansion of (1 - x + x^2)^2 / (1 - x)^3 in powers of x. 2
1, 1, 3, 5, 8, 12, 17, 23, 30, 38, 47, 57, 68, 80, 93, 107, 122, 138, 155, 173, 192, 212, 233, 255, 278, 302, 327, 353, 380, 408, 437, 467, 498, 530, 563, 597, 632, 668, 705, 743, 782, 822, 863, 905, 948, 992, 1037, 1083, 1130, 1178, 1227, 1277, 1328, 1380 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Essentially the same as A152948, A133263 and A089071. - R. J. Mathar, Mar 30 2014
LINKS
FORMULA
Euler transform of length 6 sequence [1, 2, 2, 0, 0, -2].
Binomial transform of [1, 0, 2, -2, 3, -4, 5, -6, ...].
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n.
G.f.: (1 - x + x^2)^2 / (1 - x)^3.
a(n) = a(1 - n) for all n in Z.
a(n + 1) = A133263(n) if n>=0. a(n) = (n^2 - n) / 2 + 2 unless n=0 or n=1.
(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
EXAMPLE
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 + ...
MATHEMATICA
a[ n_] := (n^2 - n) / 2 + If[ n == 0 || n == 1, 1, 2];
CoefficientList[Series[(1-x+x^2)^2/(1-x)^3, {x, 0, 50}], x] (* G. C. Greubel, Aug 07 2018 *)
PROG
(PARI) {a(n) = (n^2 - n) / 2 + 2 - (n==0) - (n==1)};
(PARI) {a(n) = if( n<0, n = 1-n); polcoeff( (1 - x + x^2)^2 / (1 - x)^3 + x * O(x^n), n)};
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+x^2)^2/(1-x)^3)); // G. C. Greubel, Aug 07 2018
CROSSREFS
Cf. A133263.
Sequence in context: A002579 A023544 A133263 * A038088 A018917 A167385
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Feb 28 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 04:13 EDT 2024. Contains 371235 sequences. (Running on oeis4.)