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.

A044819 Positive integers having distinct base-8 run lengths.

This page as a plain text file.
%I A044819 #14 Jan 04 2021 18:19:05
%S A044819 1,2,3,4,5,6,7,9,18,27,36,45,54,63,64,72,73,74,75,76,77,78,79,82,91,
%T A044819 100,109,118,127,128,137,144,145,146,147,148,149,150,151,155,164,173,
%U A044819 182,191,192,201,210,216,217,218,219,220,221,222,223,228,237,246,255,256
%N A044819 Positive integers having distinct base-8 run lengths.
%H A044819 David A. Corneth, <a href="/A044819/b044819.txt">Table of n, a(n) for n = 1..10000</a>
%e A044819 222 = 336_8 has a run length of two and a run length of 1, which are distinct lengths, so 222 is in the sequence. - _R. J. Mathar_, Jan 18 2018
%p A044819 rlset := proc(L::list)
%p A044819     local lset,rl,i ;
%p A044819     lset := [] ;
%p A044819     rl := 1 ;
%p A044819     for i from 2 to nops(L) do
%p A044819         if op(i,L) = op(i-1,L) then
%p A044819             rl := rl+1 ;
%p A044819         else
%p A044819             lset := [op(lset),rl] ;
%p A044819             rl := 1;
%p A044819         end if;
%p A044819     end do:
%p A044819     lset := [op(lset),rl] ;
%p A044819 end proc:
%p A044819 isA044819 := proc(n)
%p A044819     local dgs,rl;
%p A044819     dgs := convert(n,base,8) ;
%p A044819     rl := rlset(dgs) ;
%p A044819     if nops(rl) = nops( convert(rl,set)) then
%p A044819         true;
%p A044819     else
%p A044819         false;
%p A044819     end if;
%p A044819 end proc:
%p A044819 for n from 1 to 400 do
%p A044819     if isA044819(n) then
%p A044819         printf("%d,",n) ;
%p A044819     end if;
%p A044819 end do: # _R. J. Mathar_, Jan 18 2018
%Y A044819 Cf. A044813, A044814, A044815, A044816, A044817, A044818, A044819, A044820, A044821, A044822, A044823, A044824, A044825, A044826, A044827 (base 2 to base 16).
%K A044819 nonn,base
%O A044819 1,2
%A A044819 _Clark Kimberling_