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.

A244893 a(n) = a(n-a(n-1)) with initial values 2,3,2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 17 2014

Keywords

Comments

After first term, periodic with period {3,2,3}.

Programs

  • Maple
    f:=proc(n,o,S) option remember; # o = offset, S = init. terms
    L:=nops(S);
    if n < 0 then 0
    elif n <= o+L-1 then S[n-o+1]
    else f(n-f(n-1,o,S),o,S); fi; end;
    [seq(f(n,1,[2,3,2]),n=1..100)];
  • Mathematica
    Join[{2},LinearRecurrence[{0, 0, 1},{3, 2, 3},75]] (* Ray Chandler, Aug 25 2015 *)

Formula

a(n) = A164359(n), n>1. - R. J. Mathar, Jul 25 2014