cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A043698 Numbers whose base-9 representation has an even number of runs.

Original entry on oeis.org

9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 90, 92, 93, 94, 95, 96, 97, 98, 101, 111, 121, 131, 141
Offset: 1

Views

Author

Keywords

Programs

  • 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