OFFSET
1,6
COMMENTS
For k >= 1, a(3^k * (k - 1/2) + 1/2) = 1 and a(3^k * (k - 1/2) + 3/2) = a(3^k * (k - 1/2) + 5/2) = 0. - Robert Israel, Jun 23 2024
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
R:= 0: t:= 0:
for i from 1 to 100 do
L:= convert(i, base, 3);
for j from 1 to nops(L) do
if L[j] = 1 then t:= t+1 elif L[j] = 2 then t:= t-1 fi;
R:= R, t;
od
od:
R; # Robert Israel, Jun 23 2024
CROSSREFS
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
a(1) = 0 inserted by Robert Israel, Jun 23 2024
STATUS
approved