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.

A043605 Numbers whose base-5 representation has exactly 5 runs.

This page as a plain text file.
%I A043605 #14 Apr 25 2021 01:24:45
%S A043605 651,652,653,654,660,661,663,664,665,666,667,669,670,671,672,673,676,
%T A043605 677,678,679,680,682,683,684,690,691,692,694,695,696,697,698,701,702,
%U A043605 703,704,705,707,708,709,710,711,713,714,720
%N A043605 Numbers whose base-5 representation has exactly 5 runs.
%H A043605 Robert Israel, <a href="/A043605/b043605.txt">Table of n, a(n) for n = 1..10000</a>
%p A043605 fBC:= proc(b,c) local t,i,j,m;
%p A043605     m:= 1/5; t:= 0:
%p A043605     for i from 1 to 5 do
%p A043605        for j from 1 to c[i] do
%p A043605          m:= 5*m;
%p A043605          t:= t + b[i]*m;
%p A043605     od od;
%p A043605   t
%p A043605 end proc:
%p A043605 F:= proc(n) local Res, a,b,c, q, B,C;
%p A043605   Res:= NULL;
%p A043605   B:= [seq(seq(seq(seq(seq([a[1],a[2],a[3],a[4],a[5]],a[1]=subs(a[2]=NULL,[$0..4])),a[2]=subs(a[3]=NULL,[$0..4])),a[3]=subs(a[4]=NULL,[$0..4])),a[4]=subs(a[5]=NULL,[$0..4])),a[5]=1..4)];
%p A043605   sort([seq(seq(fBC(b,c),b=B),c=combinat:-composition(n,5))])
%p A043605 end proc:
%p A043605 op(F(5)),op(F(6)); # _Robert Israel_, Jan 22 2019
%t A043605 Select[Range[1000],Length[Split[IntegerDigits[#,5]]]==5&] (* _Harvey P. Dale_, Jan 02 2014 *)
%Y A043605 Cf. A007091.
%K A043605 nonn,base
%O A043605 1,1
%A A043605 _Clark Kimberling_