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

A270824 Period 16: repeat [0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1].

Original entry on oeis.org

0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1, 0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1, 0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1, 0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1, 0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1, 0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1
Offset: 0

Views

Author

William Walkington, Mar 23 2016

Keywords

Crossrefs

Cf. A270823.

Programs

  • Mathematica
    PadRight[{},120,{0,1,1,0,2,3,3,2,3,2,2,3,1,0,0,1}] (* Harvey P. Dale, Sep 16 2017 *)
  • PARI
    a(n)=[0, 1, 1, 0, 2, 3, 3, 2, 3, 2, 2, 3, 1, 0, 0, 1][n%16+1] \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = (floor((n+4)/4) - [floor(n/4) + floor((n+4)/4)] * [(floor((n+12)/8)) mod 2 * (floor((n+3)/2)) mod 2 + (floor((n+4)/8)) mod 2 * (floor((n+1)/2)) mod 2]) mod 4.
From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = a(n-1) - a(n-8) + a(n-9) for n > 8.
G.f.: x*(1 - x^2 + 2*x^3 + x^4 - x^6 + x^7)/((1 - x)*(1 + x^8)). (End)
Showing 1-1 of 1 results.