login
A044934
Number of runs of even length in the base 3 representation of n.
3
0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 2, 1, 1, 0, 1, 0, 1, 1, 2, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 2, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 1, 1, 2, 1
OFFSET
1,36
LINKS
MAPLE
f:= proc(n) local L, d, R;
L:= convert(n, base, 3);
d:= nops(L);
R:= select(t -> (t=1) or (t=d+1) or (L[t] <> L[t-1]), [$1..d+1]);
R:= R[2..-1] - R[1..-2];
nops(select(type, R, even))
end proc:
map(f, [$1..100]); # Robert Israel, Oct 21 2025
MATHEMATICA
A044934[n_] := Count[Map[Length, Split[IntegerDigits[n, 3]]], _?EvenQ];
Array[A044934, 100] (* Paolo Xausa, Oct 22 2025 *)
CROSSREFS
KEYWORD
nonn,base,easy
STATUS
approved