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-2 of 2 results.

A168378 a(n) = 3 + 8*floor(n/2).

Original entry on oeis.org

3, 11, 11, 19, 19, 27, 27, 35, 35, 43, 43, 51, 51, 59, 59, 67, 67, 75, 75, 83, 83, 91, 91, 99, 99, 107, 107, 115, 115, 123, 123, 131, 131, 139, 139, 147, 147, 155, 155, 163, 163, 171, 171, 179, 179, 187, 187, 195, 195, 203, 203, 211, 211, 219, 219, 227, 227, 235, 235
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2009

Keywords

Comments

More generally, 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, have the closed form b(n) = (2*h*n + (3*h + 2*k - 4*c)*(-1)^n + h + 2*k)/4. Also, if 2*c = h+k, then b(n) = c + h*floor(n/2); if 2*c = 2*h+k, then b(n) = c + h*floor((n-1)/2); if 2*c = k, b(n) = c + h*floor((n+1)/2). - Bruno Berselli, Sep 18 2013

Crossrefs

Programs

  • Magma
    [3+8*Floor(n/2): n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
  • Mathematica
    Table[ 3 + 8*floor(n/2), {n,60}] (* Bruno Berselli, Sep 18 2013 *)
    CoefficientList[Series[(3 + 8 x - 3 x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)
    LinearRecurrence[{1,1,-1},{3,11,11},80] (* Harvey P. Dale, Oct 05 2022 *)

Formula

a(n) = 8*n - a(n-1) - 2, with n>1, a(1)=3.
G.f.: x*(3 + 8*x - 3*x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 18 2013
a(n) = 4*n + 2*(-1)^n + 1. - Bruno Berselli, Sep 18 2013
a(n) = A168381(n) + 1 = A168398(n) - 1. - Bruno Berselli, Sep 18 2013
E.g.f.: (4*x + 3)*cosh(x) + (4*x - 1)*sinh(x) - 3. - G. C. Greubel, Jul 19 2016

Extensions

New definition by Vincenzo Librandi, Sep 18 2013

A168390 a(n) = 1 + 8*floor(n/2).

Original entry on oeis.org

1, 9, 9, 17, 17, 25, 25, 33, 33, 41, 41, 49, 49, 57, 57, 65, 65, 73, 73, 81, 81, 89, 89, 97, 97, 105, 105, 113, 113, 121, 121, 129, 129, 137, 137, 145, 145, 153, 153, 161, 161, 169, 169, 177, 177, 185, 185, 193, 193, 201, 201, 209, 209, 217, 217, 225, 225, 233, 233
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2009

Keywords

Crossrefs

Programs

  • Magma
    [1+8*Floor(n/2): n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
  • Mathematica
    RecurrenceTable[{a[1]==1,a[n]==8n-a[n-1]-6},a,{n,60}] (* or *) LinearRecurrence[{1,1,-1},{1,9,9},60] (* or *) With[{c=Table[8n+1,{n,0,40}]},Rest[Riffle[c,c]]] (* Harvey P. Dale, Jul 28 2012 *)
    Table[1 + 8 Floor[n/2], {n, 60}] (* Bruno Berselli, Sep 18 2013 *)
    CoefficientList[Series[(1 + 8 x - x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)

Formula

a(n) = 8*n - a(n-1) - 6, with n>1, a(1)=1.
a(1)=1, a(2)=9, a(3)=9; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Jul 28 2012
G.f.: x*(1 + 8*x - x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
a(n) = A168381(n) - 1 = A168378(n) - 2. - Bruno Berselli, Sep 18 2013
E.g.f.: (2 - exp(x) + (4*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 19 2016

Extensions

New definition by Vincenzo Librandi, Sep 18 2013
Showing 1-2 of 2 results.