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.

A239466 Expansion of (1 - x + x^2 + sqrt(1 + 2*x + 3*x^2 - 2*x^3 + x^4)) / 2 in powers of x.

Original entry on oeis.org

1, 0, 1, -1, 1, 0, -2, 4, -3, -5, 20, -29, 1, 94, -221, 191, 327, -1454, 2282, -162, -8002, 19902, -18275, -30505, 143511, -234364, 24437, 841723, -2164873, 2069014, 3325410, -16315410, 27375369, -3714435, -98829168, 260605269, -257026289, -395719442
Offset: 0

Views

Author

Michael Somos, Mar 19 2014

Keywords

Examples

			G.f. = 1 + x^2 - x^3 + x^4 - 2*x^6 + 4*x^7 - 3*x^8 - 5*x^9 + 20*x^10 + ...
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!((1-x+x^2 +Sqrt(1+2*x+3*x^2-2*x^3+x^4))/2)); // G. C. Greubel, Aug 08 2018
  • Mathematica
    CoefficientList[Series[(1-x+x^2 +Sqrt[1+2*x+3*x^2-2*x^3+x^4])/2, {x, 0, 50}], x] (* G. C. Greubel, Aug 08 2018 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x + x^2 + sqrt(1 + 2*x + 3*x^2 - 2*x^3 + x^4 + x * O(x^n))) / 2, n))};
    
  • PARI
    {a(n) = my(A = 1 + O(x)); for(k=1, ceil(n / 3), A = 1 + x^2 / (1 + x / A)); polcoeff(A, n)};
    

Formula

G.f.: 1 - x + x^2 + x / (1 - x + x^2 + x / (1 - x + x^2 + x / ...)). (continued fraction convergence is one power series term per iteration).
G.f.: 1 + x^2 / (1 + x / (1 + x^2 / (1 + x / ...))). (continued fraction convergence is three power series terms per iteration).
a(n) = - A129509(n) if n>2.
HANKEL transform is period 8 sequence A112299(n+5) = [1, 1, -1, 0, 1, -1, -1, 0, ...].
HANKEL transform of a(n+1) is period 8 sequence -A112299(n+4) = [0, -1, -1, 1, 0, -1, 1, 1, ...].
D-finite with recurrence: n*a(n) +(2*n-3)*a(n-1) +3*(n-3)*a(n-2) +(-2*n+9)*a(n-3) +(n-6)*a(n-4)=0. - R. J. Mathar, Jan 25 2020