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.

A168409 a(n) = 8 + 9*floor((n-1)/2).

Original entry on oeis.org

8, 8, 17, 17, 26, 26, 35, 35, 44, 44, 53, 53, 62, 62, 71, 71, 80, 80, 89, 89, 98, 98, 107, 107, 116, 116, 125, 125, 134, 134, 143, 143, 152, 152, 161, 161, 170, 170, 179, 179, 188, 188, 197, 197, 206, 206, 215, 215, 224, 224, 233, 233, 242, 242, 251, 251, 260
Offset: 1

Views

Author

Vincenzo Librandi, Nov 25 2009

Keywords

Comments

Old definition: "a(n)=9*n-a(n-1)-2 (with a(1)=8)".
The sequences generated by the recursive relation b(n) = h*n-b(n-1)+k, with b(1)=c and h, k, c prefixed integers, satisfy the formula b(n) = c + h*floor((n-1)/2) when 2*h+k = 2*c. - Bruno Berselli, Sep 18 2013

Crossrefs

Cf. A017257.

Programs

  • Magma
    [8+9*Floor((n-1)/2): n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
    
  • Mathematica
    RecurrenceTable[{a[1]==8,a[n]==9n-a[n-1]-2},a,{n,60}] (* or *) LinearRecurrence[{1,1,-1},{8,8,17},80] (* or *) With[{c = LinearRecurrence[{2,-1},{8,17},30]},Riffle[c,c]] (* Harvey P. Dale, Aug 18 2013 *)
    CoefficientList[Series[(8 + x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)
  • PARI
    a(n)=(n-1)\2*9 + 8 \\ Charles R Greathouse IV, Jul 21 2016

Formula

a(n) = 9*n - a(n-1) - 2, with n>1, a(1)=8.
a(1)=8, a(2)=8, a(3)=17; for n>1, a(n) = a(n-1) +a(n-2) -a(n-3). - Harvey P. Dale, Aug 18 2013
G.f.: x*(8 + x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
E.g.f.: (1/4)*(-9 + 4*exp(x) + (5 + 18*x)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 21 2016

Extensions

New definition by Vincenzo Librandi, Sep 18 2013