OFFSET
0,2
COMMENTS
Periodic with period 8.
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
From Wesley Ivan Hurt, Jun 22 2022: (Start)
a(n) = 2*A105198(n).
a(n) = a(n-1)-a(n-2)+a(n-3)-a(n-4)+a(n-5)-a(n-6)+a(n-7). (End)
MATHEMATICA
PadRight[{}, 105, {0, 2, 6, 4, 4, 6, 2, 0}] (* Michael De Vlieger, Jun 22 2022 *)
PROG
(PARI) A053794(n)=[0, 2, 6, 4, 4, 6, 2, 0][n%8+1] \\ M. F. Hasler, Aug 27 2012
(Scheme) (define (A053794 n) (modulo (+ (* n n) n) 8)) ;; Antti Karttunen, Aug 10 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stuart M. Ellerstein (ellerstein(AT)aol.com), Mar 27 2000
EXTENSIONS
More terms from James A. Sellers, Apr 08 2000
Extended to n=103 by Antti Karttunen, Aug 10 2017
STATUS
approved