A133884 a(n) = binomial(n+4,n) mod 4.
1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 2, 2, 2, 2, 3
Offset: 0
Examples
For n=2, binomial(6,2) = 6*5/2 = 15, which is 3 (mod 4) so a(2) = 3. - _Michael B. Porter_, Jul 19 2016
Links
- Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1).
Crossrefs
Programs
-
Magma
[Binomial(n+4,n) mod 4: n in [0..100]]; // Vincenzo Librandi, Jul 15 2016
-
Mathematica
Table[Mod[Binomial[n + 4, 4], 4], {n, 0, 100}] (* Vincenzo Librandi, Jul 15 2016 *)
Formula
a(n) = binomial(n+4,4) mod 4.
G.f.: (1 + x + 3*x^2 + 3*x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 + 3*x^8 + 3*x^9 + x^10 + x^11)/(1 - x^16) = (1 + 2*x^2 + 2*x^6 + x^8)/((1 - x)*(1 + x^4)*(1 + x^8)).
a(n) = A000505(n+5) mod 4. - John M. Campbell, Jul 14 2016
a(n) = A000506(n+6) mod 4. - John M. Campbell, Jul 15 2016
Extensions
G.f. corrected by Bruno Berselli, Jul 19 2016
Comments