OFFSET
1,1
MAPLE
isA043698 := proc(n)
local dgs, runs, i ;
dgs := convert(n, base, 9) ;
runs :=1 ;
for i from 2 to nops(dgs) do
if op(i, dgs) <> op(i-1, dgs) then
runs := runs+1 ;
end if;
end do:
if type(runs, 'even') then
true;
else
false;
end if;
end proc:
A043698 := proc(n)
option remember;
local a;
if n = 1 then
9;
else
for a from procname(n-1)+1 do
if isA043698(a) then
return a ;
end if;
end do:
end if
end proc:
seq(A043698(n), n=1..120) ; # R. J. Mathar, Feb 20 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved