login
A090141
a(n) = Mod[n,4+Sum[Mod[Floor[n/4^m],4],{m,1,10}]]
0
1, 2, 3, 4, 0, 1, 2, 2, 3, 4, 5, 5, 6, 0, 1, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 2, 3, 4, 5, 1, 2, 3, 4, 0, 1, 2, 3, 8, 0, 1, 2, 6, 0, 1, 2, 4, 5, 6, 7, 2, 3, 4, 5, 0, 1, 2, 3, 4, 0, 1, 2, 2, 3, 4, 5, 2, 3, 4, 5, 4, 5, 6, 7, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 2, 3, 4, 5, 5, 6, 0, 1, 4, 5, 6, 7, 5, 6
OFFSET
1,2
MATHEMATICA
f[n_]=4+Sum[Mod[Floor[n/4^m], 4], {m, 1, 10}]
Table[Mod[n, f[n]], {n, 1, 2000}]
CROSSREFS
Sequence in context: A122275 A197024 A031235 * A049264 A010874 A330358
KEYWORD
nonn,easy,less
AUTHOR
Roger L. Bagula, Jan 19 2004
STATUS
approved