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.

A047618 Numbers that are congruent to {0, 2, 5} mod 8.

Original entry on oeis.org

0, 2, 5, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 34, 37, 40, 42, 45, 48, 50, 53, 56, 58, 61, 64, 66, 69, 72, 74, 77, 80, 82, 85, 88, 90, 93, 96, 98, 101, 104, 106, 109, 112, 114, 117, 120, 122, 125, 128, 130, 133, 136, 138, 141, 144, 146, 149, 152, 154, 157, 160, 162
Offset: 1

Views

Author

Keywords

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0, 2, 5]]; // Wesley Ivan Hurt, Jun 10 2016
  • Maple
    seq(3*n - floor(n/3) - (n^2 mod 3), n=0..51); # Gary Detlefs, Mar 19 2010
  • Mathematica
    LinearRecurrence[{1, 0, 1, -1}, {0, 2, 5, 8}, 62] (* L. Edson Jeffery, Sep 02 2014 *)
    Table[((8*n-9)+2*Sin[(2*n*Pi)/3]/Sqrt[3])/3, {n, 62}] (* L. Edson Jeffery, Sep 02 2014 *)
    Table[8 n + {0, 2, 5}, {n, 0, 100}]//Flatten (* Vincenzo Librandi, Jun 11 2016 *)
  • PARI
    a(n) = floor(8*(n-1)/3); \\ Michel Marcus, Sep 03 2014
    

Formula

a(n) = 3*(n - 1) - floor((n - 1)/3) - ((n - 1)^2 % 3). - Gary Detlefs, Mar 19 2010; corrected by L. Edson Jeffery, Sep 02 2014
a(n) = floor(8*(n-1)/3). - Gary Detlefs, Jan 02 2012
G.f.: x^2*(2+3*x+3*x^2)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Feb 03 2014
Conjecture: a(n)+a(n+1)+a(n+2) = 8*n-1; or a(n) = 8*(n-2)-a(n-1)-a(n-2)-1, n>3, with a(1)=0, a(2)=2, a(3)=5. - L. Edson Jeffery, Sep 02 2014
a(n) = a(n-1)+a(n-3)-a(n-4), n>4, with a(1)=0, a(2)=2, a(3)=5, a(4)=8. - L. Edson Jeffery, Sep 02 2014
a(n) = ((8*n-9)+2*sin((2*n*Pi)/3)/sqrt(3))/3. - L. Edson Jeffery, Sep 02 2014
a(3k) = 8k-3, a(3k-1) = 8k-6, a(3k-2) = 8k-8. - Wesley Ivan Hurt, Jun 10 2016