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.

This page as a plain text file.
%I A044820 #16 Jan 04 2021 18:19:13
%S A044820 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,
%T A044820 98,101,111,121,131,141,151,161,162,172,180,181,182,183,184,185,186,
%U A044820 187,188,192,202,212,222,232,242,243,253,263,270,271,272,273,274,275,276
%N A044820 Positive integers having distinct base-9 run lengths.
%H A044820 David A. Corneth, <a href="/A044820/b044820.txt">Table of n, a(n) for n = 1..10000</a>
%e A044820 242 = 288_9 is in the sequence as it has distinct run lengths of distinct digits (1, 2). - _David A. Corneth_, Jan 04 2021
%p A044820 rlset := proc(L::list)
%p A044820     local lset,rl,i ;
%p A044820     lset := [] ;
%p A044820     rl := 1 ;
%p A044820     for i from 2 to nops(L) do
%p A044820         if op(i,L) = op(i-1,L) then
%p A044820             rl := rl+1 ;
%p A044820         else
%p A044820             lset := [op(lset),rl] ;
%p A044820             rl := 1;
%p A044820         end if;
%p A044820     end do:
%p A044820     lset := [op(lset),rl] ;
%p A044820 end proc:
%p A044820 isA044820 := proc(n)
%p A044820     local dgs,rl;
%p A044820     dgs := convert(n,base,9) ;
%p A044820     rl := rlset(dgs) ;
%p A044820     if nops(rl) = nops( convert(rl,set)) then
%p A044820         true;
%p A044820     else
%p A044820         false;
%p A044820     end if;
%p A044820 end proc:
%p A044820 for n from 1 to 400 do
%p A044820     if isA044820(n) then
%p A044820         printf("%d,",n) ;
%p A044820     end if;
%p A044820 end do: # _R. J. Mathar_, Jan 18 2018
%Y A044820 Cf. A044813, A044814, A044815, A044816, A044817, A044818, A044819, A044820, A044821, A044822, A044823, A044824, A044825, A044826, A044827 (base 2 to base 16).
%K A044820 nonn,base
%O A044820 1,2
%A A044820 _Clark Kimberling_