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.

A172397 a(n) = a(n-1) + a(n-2) - a(n-3) - a(n-8), starting 1,1,2,2,3,3,4,4.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 1, -2, -7, -13, -22, -32, -45, -58, -72, -83, -90, -88, -73, -39, 21, 113, 245, 420, 642, 905, 1200, 1502, 1776, 1965, 1994, 1763, 1150, 14, -1799, -4437, -8026, -12629, -18212, -24578, -31311, -37691, -42625, -44568, -41476
Offset: 0

Views

Author

Roger L. Bagula, Nov 20 2010

Keywords

Crossrefs

Cf. A023438.

Programs

  • GAP
    a:=[1,1,2,2,3,3,4,4];; for n in [9..50] do a[n]:=a[n-1]+a[n-2]-a[n-3]-a[n-8]; od; a; # G. C. Greubel, Mar 01 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x-x^2+x^3+x^8) )); // G. C. Greubel, Mar 01 2019
    
  • Mathematica
    f[-6]=0; f[-5]=0; f[-4]=0; f[-3]=0; f[-2]=0; f[-1]=0; f[0]=1; f[1]=1;
    f[n_]:= f[n] =f[n-1]+f[n-2]-f[n-3]-f[n-8]; Table[f[n], {n, 0, 50}]
    LinearRecurrence[{1,1,-1,0,0,0,0,-1},{1,1,2,2,3,3,4,4},50] (* Harvey P. Dale, Nov 20 2012 *)
  • PARI
    my(x='x+O('x^50)); Vec(1/(1-x-x^2+x^3+x^8)) \\ G. C. Greubel, Mar 01 2019
    
  • Sage
    (1/(1-x-x^2+x^3+x^8)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Mar 01 2019
    

Formula

G.f.: 1/(1 - x - x^2 + x^3 + x^8).

Extensions

More terms from Harvey P. Dale, Nov 20 2012

A173199 a(n) = a(n-1)+a(n-2)-Floor(a(n-3)/2)-Floor(a(n-8)/2); initial terms are 0, 1, 1, 2, 3, 5, 7, 11.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 7, 11, 16, 24, 35, 50, 72, 103, 147, 209, 297, 421, 597, 845, 1196, 1692, 2393, 3383, 4782, 6759, 9552, 13498, 19073, 26949, 38077, 53799, 76011, 107393, 151729, 214368, 302865, 427895, 604538, 854102
Offset: 0

Views

Author

Roger L. Bagula, Nov 22 2010

Keywords

Comments

A two wave dying rabbits type sequence with limiting ratio 1.41280984879641.

Crossrefs

Cf. A023438 (dying rabbits).

Programs

  • Magma
    I:=[0, 1, 1, 2, 3, 5, 7, 11]; [ n le 8 select I[n] else Self(n-1)+Self(n-2)-(Self(n-3) div 2)-(Self(n-8) div 2): n in [1..40] ];
  • Mathematica
    f[-6] = 0; f[-5] = 0; f[-4] = 0; f[-3] = 0; f[-2] = 0; f[-1] = 0;
    f[0] = 0; f[1] = 1;
    f[n_] := f[n] = f[n - 1] + f[n - 2] - Floor[f[n - 3]/2] - Floor[f[n -8]/2];
    Table[f[n], {n, 0, 30}]

A171997 a(n) = a(n-1) + a(n-2) - floor(a(n-2)/2) - floor(a(n-5)/2); initial terms are 1, 1, 2, 3, 4.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 10, 13, 16, 20, 24, 29, 35, 42, 50, 59, 70, 83, 97, 114, 134, 156, 182, 212, 246, 285, 330, 382, 441, 509, 588, 678, 781, 900, 1037, 1193, 1373, 1580, 1817, 2089, 2402, 2761, 3172, 3645, 4187, 4809, 5523, 6342, 7282, 8360
Offset: 1

Views

Author

Roger L. Bagula, Nov 22 2010

Keywords

Comments

lim_{n -> infinity} a(n+1)/a(n) = 1.14710876512065387719410850648860644150605499412513....
a(n) = A062435(n+2) for n < 15.

Crossrefs

Cf. A062435 (integer part of log(n!)^log(log(1 + n))), A023434 (a(n)=a(n-1)+a(n-2)-a(n-4)), A023435 (a(n)=a(n-1)+a(n-2)-a(n-5)), A023436 (a(n)=a(n-1)+a(n-2)-a(n-6)), A023437 (a(n)=a(n-1)+a(n-2)-a(n-7)), A023438 (a(n)=a(n-1)+a(n-2)-a(n-8)), A023439 (a(n)=a(n-1)+a(n-2)-a(n-9)), A023440 (a(n)=a(n-1)+a(n-2)+a(n-10)), A023441 (a(n)=a(n-1)+a(n-2)-a(n-11)), A023442 (a(n)=a(n-1)+a(n-2)-a(n-12)), A000044 (a(n)=a(n-1)+a(n-2)-a(n-13)), A173199 (a(n)=a(n-1)+a(n-2)-floor(a(n-3)/2)-floor(a(n-8)/2)).

Programs

  • Magma
    I:=[1,1,2,3,4]; [n le 5 select I[n] else Self(n-1) + Self(n-2) - Floor(Self(n-2)/2) - Floor(Self(n-5)/2): n in [1..60]]; // Vincenzo Librandi, Jun 24 2015
  • Mathematica
    f[-3] = 0; f[-2] = 0; f[-1] = 0; f[0] = 1; f[1] = 1;
    f[n_] := f[n] = f[n - 1] + f[n - 2] - Floor[f[n - 2]/2] - Floor[f[n - 5]/2]
    Table[f[n], {n, 0, 50}]

Extensions

Offset changed from 0 to 1 by Klaus Brockhaus, Nov 29 2010
Showing 1-3 of 3 results.