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.

A133265 Diagonal of the A135356 triangle.

Original entry on oeis.org

2, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74, 2, 76, 2, 78, 2, 80
Offset: 0

Views

Author

Paul Curtz, Dec 20 2007

Keywords

Comments

Regular continued fraction expansion of 2*sin(1/2)/( cos(1/2) - sin(1/2) ) = 2.40822 34423 35827 84841 ... = 2 + 1/(2 + 1/(2 + 1/(4 + 1/(2 + 1/(6 + 1/(2 + 1/(8 + 1/(2 + ... )))))))). Cf. A019425. - Peter Bala, Feb 15 2015

Crossrefs

Cf. A019425.

Programs

  • Magma
    [(n+3+(n-1)*(-1)^(n+1))/2: n in [0..80]]; // Vincenzo Librandi, Aug 30 2011
    
  • Maple
    A133265 := n -> (n+2+(n-2)*(-1)^n)/2: # Peter Luschny, Aug 30 2011
  • Mathematica
    Table[(n + 3 + (n - 1) (-1)^(n + 1))/2, {n, 0, 79}] (* or *)
    Table[Mod[(2 n + 5), (n (3 + (-1)^n) - (-1)^n + 7)/2], {n, 0, 79}] (* or *)
    CoefficientList[Series[2 (1 + x - x^2)/((1 - x)^2*(1 + x)^2), {x, 0, 79}], x] (* Michael De Vlieger, Nov 18 2016 *)
  • PARI
    Vec(2*(1 + x - x^2) / ((1 - x)^2 * (1 + x)^2) + O(x^100)) \\ Colin Barker, Nov 17 2016

Formula

2*(A057979 without 1, 0, first two terms).
a(n) = (n+3+(n-1)*(-1)^(n+1))/2. - Vincenzo Librandi, Aug 30 2011
a(n) = (2*n + 5) mod (n*(3 + (-1)^n) - (-1)^n + 7)/2. - Lechoslaw Ratajczak, Nov 17 2016
From Colin Barker, Nov 17 2016: (Start)
a(n) = 2*a(n-2) - a(n-4) for n>3.
G.f.: 2*(1 + x - x^2) / ((1 - x)^2 * (1 + x)^2).
(End)