A121062 Partition numbers mod 4.
1, 1, 2, 3, 1, 3, 3, 3, 2, 2, 2, 0, 1, 1, 3, 0, 3, 1, 1, 2, 3, 0, 2, 3, 3, 2, 0, 2, 2, 1, 0, 2, 1, 3, 2, 3, 1, 1, 3, 1, 2, 3, 2, 1, 3, 2, 2, 2, 1, 1, 2, 3, 1, 3, 3, 0, 3, 2, 0, 0, 3, 1, 0, 3, 2, 2, 0, 1, 3, 1, 0, 1, 3, 1, 0, 0, 3, 3, 0, 2, 0, 3, 3, 1, 0, 1, 2, 1, 1, 1, 1, 3, 3, 1, 0, 3, 0, 2, 0, 3, 0, 2, 3, 2, 1
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, (b(n, i-1)+b(n-i, min(n-i, i))) mod 4)) end: a:= n-> b(n$2): seq(a(n), n=0..104); # Alois P. Heinz, Dec 20 2024
-
Mathematica
f[n_] := Mod[PartitionsP@n, 4]; Table[f@n, {n, 0, 104}] (* Robert G. Wilson v *)
-
PARI
a(n) = numbpart(n) % 4; \\ Michel Marcus, Jun 29 2016
Formula
a(n) = A000025(n) mod 4. - John M. Campbell, Jun 29 2016
Extensions
More terms from Robert G. Wilson v, Aug 17 2006
Comments