login
Write 10*n in base 4; a(n) = sum of digits mod 4.
1

%I #5 Apr 02 2022 14:56:46

%S 0,0,2,2,0,1,2,0,2,2,0,0,2,0,1,2,0,0,2,2,1,2,3,0,2,2,2,2,0,1,2,3,2,2,

%T 0,0,2,3,0,2,0,0,2,2,0,2,3,0,2,2,0,0,0,1,2,3,1,1,0,0,2,3,0,1,0,0,2,2,

%U 0,1,2,0,2,2,0,0,2,1,2,3,1,1,3,3,2,3,0,1,3,3,2,2,0,1,2,3,2,2,0,0

%N Write 10*n in base 4; a(n) = sum of digits mod 4.

%H Harvey P. Dale, <a href="/A059018/b059018.txt">Table of n, a(n) for n = 0..1000</a>

%e 50_10 = 302_4, so a(5) = 3+0+2 (mod 4) = 1.

%t Table[Mod[Total[IntegerDigits[10n,4]],4],{n,0,120}] (* _Harvey P. Dale_, Apr 02 2022 *)

%K base,easy,nonn

%O 0,3

%A Robert Lozyniak (11(AT)onna.com), Feb 12 2001