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.

A168200 a(n) = 3*n - a(n-1) + 1, with a(1)=4.

Original entry on oeis.org

4, 3, 7, 6, 10, 9, 13, 12, 16, 15, 19, 18, 22, 21, 25, 24, 28, 27, 31, 30, 34, 33, 37, 36, 40, 39, 43, 42, 46, 45, 49, 48, 52, 51, 55, 54, 58, 57, 61, 60, 64, 63, 67, 66, 70, 69, 73, 72, 76, 75, 79, 78, 82, 81, 85, 84, 88, 87, 91, 90, 94, 93, 97, 96, 100, 99, 103, 102, 106, 105
Offset: 1

Views

Author

Vincenzo Librandi, Nov 20 2009

Keywords

Programs

  • Magma
    [(6*n+5-5*(-1)^n)/4: n in [1..70]];
    
  • Mathematica
    RecurrenceTable[{a[1]==4,a[n]==3n-a[n-1]+1},a,{n,70}] (* or *) LinearRecurrence[{1,1,-1},{4,3,7},80] (* Harvey P. Dale, Jul 31 2014 *)
  • PARI
    a(n)=(6*n+5-5*(-1)^n)/4 \\ Charles R Greathouse IV, Jan 11 2012

Formula

a(n) = (6*n + 5 - 5*(-1)^n)/4. - Jon E. Schoenfield, Jun 24 2010
From Joerg Arndt, Apr 24 2011: (Start)
a(n) = +1*a(n-1) + 1*a(n-2) - 1*a(n-3).
G.f.: x*(4-x)/(1-x-x^2+x^3) = x*(4-x)/((1+x)*(1-x)^2). (End)
a(n) = floor(3*(n+1)/2)-(-1)^n. - Wesley Ivan Hurt, Sep 12 2017
Sum_{n>=1} (-1)^n/a(n) = 1 - Pi/(6*sqrt(3)) - log(3)/2. - Amiram Eldar, Feb 23 2023