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.

A044820 Positive integers having distinct base-9 run lengths.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 20, 30, 40, 50, 60, 70, 80, 81, 90, 91, 92, 93, 94, 95, 96, 97, 98, 101, 111, 121, 131, 141, 151, 161, 162, 172, 180, 181, 182, 183, 184, 185, 186, 187, 188, 192, 202, 212, 222, 232, 242, 243, 253, 263, 270, 271, 272, 273, 274, 275, 276
Offset: 1

Views

Author

Keywords

Examples

			242 = 288_9 is in the sequence as it has distinct run lengths of distinct digits (1, 2). - _David A. Corneth_, Jan 04 2021
		

Crossrefs

Programs

  • Maple
    rlset := proc(L::list)
        local lset,rl,i ;
        lset := [] ;
        rl := 1 ;
        for i from 2 to nops(L) do
            if op(i,L) = op(i-1,L) then
                rl := rl+1 ;
            else
                lset := [op(lset),rl] ;
                rl := 1;
            end if;
        end do:
        lset := [op(lset),rl] ;
    end proc:
    isA044820 := proc(n)
        local dgs,rl;
        dgs := convert(n,base,9) ;
        rl := rlset(dgs) ;
        if nops(rl) = nops( convert(rl,set)) then
            true;
        else
            false;
        end if;
    end proc:
    for n from 1 to 400 do
        if isA044820(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jan 18 2018