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.

A245477 Period 6: repeat [1, 1, 1, 1, 1, 2].

Original entry on oeis.org

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

Views

Author

Hailey R. Olafson, Jul 23 2014

Keywords

Comments

First differences of A047368. The first differences of this sequence are in A131533. - Wesley Ivan Hurt, Jul 24 2014
Binomial Transform of a(n) gives: 1, 2, 4, 8, 16, 33, 70, 149, 312, 638, 1276, 2511, ... - Wesley Ivan Hurt, Aug 13 2014

Crossrefs

Programs

  • Magma
    [Floor((n+1)*7/6) - Floor((n)*7/6) : n in [0..100]]; // Wesley Ivan Hurt, Aug 06 2014
  • Maple
    A:= n -> piecewise(n mod 6 = 5, 2, 1);
    seq(A(n), n=0..100); # Robert Israel, Jul 23 2014
  • Mathematica
    Table[2 - Sign[Mod[n + 1, 6]], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 24 2014 *)
    PadRight[{},120,{1,1,1,1,1,2}] (* Harvey P. Dale, Jun 02 2016 *)
  • PARI
    a(n) = 7*(n+1)\6 - 7*n\6; \\ Michel Marcus, Jul 23 2014
    
  • Sage
    [floor((n+1)*7/6) - floor((n)*7/6) for n in [0..200]]
    

Formula

a(n) = floor((n+1)*7/6) - floor((n)*7/6).
G.f.: 1/(1-x) + x^5/(1-x^6). - Robert Israel, Jul 23 2014
From Wesley Ivan Hurt, Jul 24 2014, Aug 06-29 2014: (Start)
a(n) = 2 - sign((n+1) mod 6).
a(n) = 3 - 2^sign((n+1) mod 6).
a(n) = A172051(n) + 1.
a(2n) = 1, a(2n+1) = A177702(n).
Sum_{i=0..n-2} a(i) = A047368(n), n>0.
a(n) = 1 + mod(n, 1 + mod(n-1, 3)).
a(n) = 1 + binomial(mod(5n + 10, 6), 5). (End)
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = a(n-6) for n>5.
a(n) = (7 - cos(n*Pi) + cos(n*Pi/3) - cos(2*n*Pi/3) - sqrt(3)*sin(n*Pi/3) - sqrt(3)*sin(2*n*Pi/3))/6. (End)