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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, 0, -2, 4, -4, 0, 8, -16, 16, 0, -32, 64, -64, 0, 128, -256, 256, 0, -512, 1024, -1024, 0, 2048, -4096, 4096, 0, -8192, 16384, -16384, 0, 32768, -65536, 65536, 0, -131072, 262144, -262144, 0, 524288, -1048576, 1048576, 0, -2097152, 4194304, -4194304, 0, 8388608
Offset: 0

Views

Author

Paul Barry, Nov 21 2003

Keywords

Comments

The expansion of (1-2x)/(1-2x+2x^2) has a(n) = Sum_{k=0..n} C(n,k)(-1)^(-k)(-1)^floor(k/2).
Pisano period lengths: 1, 1, 8, 1, 4, 8, 24, 1, 24, 4, 40, 8, 12, 24, 8, 1, 16, 24, 72, 4, ... - R. J. Mathar, Aug 10 2012

Examples

			G.f. = 1 - 2*x^2 + 4*x^3 - 4*x^4 + 8*x^6 - 16*x^7 + 16*x^8 - 32*x^10 + 64*x^11 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := Re[ -(I - 1)^(n + 1)]; (* Michael Somos, May 25 2013 *)
    a[ n_] := If[ n < 0, - 2^(n-1) a[2 - n], SeriesCoefficient[ (1 + 2 x) / (1 + 2 x + 2 x^2), {x, 0, n}]]; (* Michael Somos, May 25 2013 *)
    a[ n_] := If[ n < 0, - 2^(n-1) a[2 - n], n! SeriesCoefficient[ (Cos[x] + Sin[x]) / Exp[x], {x, 0, n}]]; (* Michael Somos, May 25 2013 *)
    a[ n_] := Simplify[ -2 Sqrt[2]^(n - 1) ChebyshevT[ n + 1, -1 / Sqrt[2]]]; (* Michael Somos, May 25 2013 *)
    LinearRecurrence[{-2,-2},{1,0},50] (* Harvey P. Dale, Oct 23 2017 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace((cos(x)+sin(x))/exp(x))) \\ Joerg Arndt, May 13 2011
    
  • PARI
    vector(66, n, -real((-1+I)^n)) /* Joerg Arndt, May 13 2011 */
    
  • PARI
    {a(n) = real( -(I - 1)^(n + 1) )}; /* Michael Somos, May 25 2013 */
    
  • PARI
    {a(n) = if( n<0, - 2^(n-1) * a(2 - n), polcoeff( (1 + 2*x) / (1 + 2*x + 2*x^2) + x * O(x^n), n))}; /* Michael Somos, May 25 2013 */
    
  • PARI
    {a(n) = my(A); if( n<0, - 2^(n-1) * a(2 - n), A = x * O(x^n); n! * polcoeff( (cos(x + A) + sin(x + A)) / exp(x + A), n))}; /* Michael Somos, May 25 2013 */
    
  • PARI
    {a(n) = simplify( -2 * quadgen(8)^(n - 1) * polchebyshev( n + 1, 1, -1 / quadgen(8)))}; /* Michael Somos, May 25 2013 */

Formula

G.f.: (1+2*x)/(1+2*x+2*x^2).
a(n) = Sum_{k=0..n} C(n, k)*(-1)^(n-k)*(-1)^floor(k/2).
a(n) = sqrt(2)*2^(n/2)*sin(3*Pi*n/4+Pi/4). - Paul Barry, Feb 25 2004
a(n) = -a(n-1) + 2*a(n-3). - Paul Curtz, Apr 24 2008
Negated real part of (-1+i)^n, imaginary part is A108520. - Joerg Arndt, May 13 2011
From Sergei N. Gladkovskii, Nov 28 2011: (Start)
E.g.f.: (cos(x) + sin(x))/exp(x).
E.g.f.: A(x) = Q(0), where Q(k)=1-(x^2)/((4*k+1)*(2*k+1)+2*x*(4*k+1)*(2*k+1)/(4*k+3-2*x-x*(4*k+3)/(x-(4*k+4)/Q(k+1)))); (continued fraction). (End)
a(4*n + 1) = 0. a(2*n) = A120617(n). a(4*n + 3) = (-4)^n. - Michael Somos, May 25 2013
a(n) = - 2^(n-1)*a(2-n) for all n in Z. - Michael Somos, Jun 26 2017
a(n) = (I + 1)*((-1 - I)^n - I*(-1 + I)^n)/2. - Taras Goy, Apr 20 2019

A137505 Inverse binomial transform of A007910.

Original entry on oeis.org

1, 1, 0, 2, 0, 0, 4, -4, 4, 4, -12, 20, -12, -12, 52, -76, 52, 52, -204, 308, -204, -204, 820, -1228, 820, 820, -3276, 4916, -3276, -3276, 13108, -19660, 13108, 13108, -52428, 78644, -52428, -52428, 209716, -314572, 209716, 209716, -838860, 1258292, -838860, -838860, 3355444, -5033164, 3355444
Offset: 0

Views

Author

Paul Curtz, Apr 23 2008

Keywords

Programs

  • Mathematica
    LinearRecurrence[{-1,0,2},{1,1,0},50] (* Harvey P. Dale, Sep 17 2012 *)

Formula

Recurrence: a(n) = -a(n-1) + 2a(n-3), starting 1,1,0.
O.g.f.: (1+x)^2/((1-x)(1+2x+2x^2)). - R. J. Mathar, Jun 12 2008
a(4n) = a(4n+1) = (-1)^n*A109499(n). - Paul Curtz, Nov 01 2009
a(n) = (1/5) * (A137429(n-1) + 4) = A077973(n-2) + 2*A077973(n-1) + A077973(n). - Ralf Stephan, Aug 18 2013

Extensions

More terms from R. J. Mathar, Jun 12 2008

A173559 a(n)= +2*a(n-2) +4*a(n-3), n>3.

Original entry on oeis.org

1, -6, -13, -27, -50, -106, -208, -412, -840, -1656, -3328, -6672, -13280, -26656, -53248, -106432, -213120, -425856, -851968, -1704192, -3407360, -6816256, -13631488, -27261952, -54528000, -109049856, -218103808, -436211712, -872407040, -1744838656
Offset: 0

Views

Author

Paul Curtz, Feb 21 2010

Keywords

Comments

Generated by scanning the diagonal of the table generated by A143025 in the top row followed by higher order differences in the other rows:
1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8,...
7, -6, 6, -7, 7, -6, 6, -7, 7, -6, 6, -7, 7,...
-13, 12, -13, 14, -13, 12, -13, 14, -13, 12,..
25, -25, 27, -27, 25, -25, 27, -27, 25, -25,..
-50, 52, -54, 52, -50, 52, -54, 52, -50, 52, ...
102, -106, 106, -102, 102, -106, 106, -102,...

Programs

  • Mathematica
    LinearRecurrence[{0,2,4},{1,-6,-13,-27},30] (* Harvey P. Dale, Jan 27 2019 *)

Formula

a(n) = ( -13*2^n-2*A009116(n))/4, n>0.
a(n+1)-2*a(n) = -A137429(n-2), n>1.
G.f.: (6*x+15*x^2+19*x^3-1)/( (2*x-1) *(2*x^2+2*x+1)).
Showing 1-3 of 3 results.