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.

A173151 a(n) = a(n-1) - [a(n-1)/2] + a(n-2) - [a(n-5)/2] where [k] = floor(k).

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 16, 17, 20, 21, 25, 26, 30, 31, 36, 37, 42, 43, 49, 50, 56, 57, 64, 65, 72, 73, 81, 82, 90, 91, 100, 101, 110, 111, 121, 122, 132, 133, 144, 145, 156, 157, 169, 170
Offset: 0

Views

Author

Roger L. Bagula, Nov 22 2010

Keywords

Programs

  • 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 - 1]/2] - Floor[f[n - 5]/2]
    Table[f[n], {n, 0, 50}]

Formula

a(n) = a(n-1)-floor[a(n-1)/2]+a(n-2)-floor[a(n-5)/2].
From Chai Wah Wu, Jun 02 2016: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7) for n > 6.
G.f.: (-x^5 + x^4 - 1)/((x - 1)^3*(x + 1)^2*(x^2 + 1)). (End)
a(n) = ((-1)^n*(11 - 2*n) + 2*n*(n + 5) + 4*sin(Pi*n/2) - 4*cos(Pi*n/2) + 25)/32. - Ilya Gutkovskiy, Jun 03 2016