A082999 a(n) = A046195(n) mod 5.
1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1, 1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1, 1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1, 1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1, 1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1, 1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1, 1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4, 1, 1
Offset: 1
Keywords
Examples
a(2)=1 because A046195(2)=6=1 mod 5.
Links
- Index entries for linear recurrences with constant coefficients, signature (1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1).
Crossrefs
Cf. A046195.
Programs
-
Magma
I:=[1,1,4,1,4,0,4,0,4,0,4,1,4]; [n le 13 select I[n] else + Self(n-1) - Self(n-3) + Self(n-4) - Self(n-6) + Self(n-7) - Self(n-9) + Self(n-10) - Self(n-12) + Self(n-13): n in [1..100]]; // Vincenzo Librandi, Aug 07 2015
-
Maple
A046195 := proc(n) option remember; if n <= 7 then op(n,[1, 6, 49, 961, 8214, 70225, 1385329 ]) ; else procname(n-1)+1442*procname(n-3) -1442*procname(n-4)-procname(n-6) +procname(n-7) ; end if; end proc: A082999 := proc(n) A046195(n) mod 5 ; end proc: seq(A082999(n),n=1..120) ; # R. J. Mathar, Jul 27 2010
-
Mathematica
LinearRecurrence[{1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1}, {1, 1, 4, 1, 4, 0, 4, 0, 4, 0, 4, 1, 4}, 100] (* Vincenzo Librandi, Aug 07 2015 *)
Formula
a(n)= +a(n-1) -a(n-3) +a(n-4) -a(n-6) +a(n-7) -a(n-9) +a(n-10) -a(n-12) +a(n-13). - R. J. Mathar, Jul 27 2010
Extensions
More terms from R. J. Mathar, Jul 27 2010
Comments