OFFSET
0,2
COMMENTS
Permutation of {0,1,2,3} followed by its reversal, repeated.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8191
Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,-1,1).
FORMULA
G.f.: (3x + x^2 + 2x^3 + 2x^4 + x^5 + 3x^6)/(1 - x^8);
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) - a(n-6) + a(n-7);
a(n) = n(7n-1)/2 mod 4 = A022264(n) mod 4.
G.f.: -x*(3 - 2*x + 4*x^2 - 2*x^3 + 3*x^4) / ( (x-1)*(1+x^2)*(1+x^4) ). - R. J. Mathar, Feb 20 2015
a(n) = (3 + r/2 - s/2 + 2*cos(Pi*(1+2*n-r-s+t)/8) - 2*cos(Pi*(1-2*n+r-s+t)/8) - 2*sin(Pi*(1-2*n-r+s+t)/8))/2 where r = 2*sin(n*Pi/2), s = 2*cos(n*Pi/2) and t = cos(n*Pi). - Wesley Ivan Hurt, Oct 05 2018
PROG
(Scheme) (define (A111951 n) (list-ref '(0 3 1 2 2 1 3 0) (modulo n 8))) ;; Antti Karttunen, Aug 10 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Aug 22 2005
EXTENSIONS
Name changed, the original name moved to comments. - Antti Karttunen, Aug 10 2017
STATUS
approved