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.

A138279 Last digit of A136324. After 0, 1, period 4: repeat [1, 2, 5, 6] = A131800.

Original entry on oeis.org

0, 1, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6, 1, 2, 5, 6
Offset: 0

Views

Author

Paul Curtz, May 06 2008

Keywords

Crossrefs

Programs

  • Magma
    [0,1] cat &cat [[1, 2, 5, 6]^^30]; // Wesley Ivan Hurt, Jul 08 2016
  • Maple
    0,1,seq(op([1, 2, 5, 6]), n=0..50); # Wesley Ivan Hurt, Jul 08 2016
  • Mathematica
    PadRight[{0,1}, 120, {5,6,1,2}] (* Harvey P. Dale, Jul 14 2014 *)
  • PARI
    a(n)=if(n>1,[6,1,2,5][n%4+1],n)
    
  • PARI
    concat(0, Vec((x+x^2+2*x^3+5*x^4+5*x^5)/(1-x^4) + O(x^99))) \\ Altug Alkan, Jul 08 2016
    

Formula

From Wesley Ivan Hurt, Jul 08 2016: (Start)
G.f.: (x+x^2+2*x^3+5*x^4+5*x^5)/(1-x^4).
a(n) = a(n-4) for n>5.
a(n) = (7 - I^(2*n) + (2 + 2*I)*I^(-n) + (2 - 2*I)*I^n)/2 for n>1. (End)