LINKS
Colin Barker, <a href="/A270841/b270841_2.txt">Table of n, a(n) for n = 1..1000</a>
Colin Barker, <a href="/A270841/b270841_2.txt">Table of n, a(n) for n = 1..1000</a>
proposed
approved
editing
proposed
Colin Barker, <a href="/A270841/b270841_2.txt">Table of n, a(n) for n = 1..1000</a>
Colin Barker, <a href="/A270841/b270841_1.txt">TITLE FOR LINK</a>
Colin Barker, <a href="/A270841/b270841_1.txt">Table of n, a(n) for n = 1..1000TITLE FOR LINK</a>
Colin Barker, <a href="/A270841/b270841.txt">Table of n, a(n) for n = 1..1000</a>
approved
editing
proposed
approved
editing
proposed
If 0 <= a(1) < 4, a(n) is eventually equal to (n - 1).
If a(1) = 4, a(n) is eventually equal to (n + 1).
(PARI) a(n)=if(n>1, ([0, 1, 0; 0, 0, 1; 2, -5, 4]^(n*[5/4; 5/-2; 4])[1, +n+1], , 5) \\ Charles R Greathouse IV, Mar 28 2016