A113217 Parity of decimal digital root of n.
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1
Offset: 0
Links
- Eric Weisstein's World of Mathematics, Digital Root
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
Programs
-
Mathematica
Table[Mod[ResourceFunction["AdditiveDigitalRoot"][n],2],{n,0,104}] (* James C. McMahon, Jun 19 2024 *)
Formula
a(n) = A010888(n) mod 2.
a(n) = if n mod 9 = 1 then 1 else 1 - a(n-1), a(0)=0.
a(n) = (1+(-1)^floor(8*n/9))/2 for n>0. - Wesley Ivan Hurt, Apr 27 2020
Comments