A043605 Numbers whose base-5 representation has exactly 5 runs.
651, 652, 653, 654, 660, 661, 663, 664, 665, 666, 667, 669, 670, 671, 672, 673, 676, 677, 678, 679, 680, 682, 683, 684, 690, 691, 692, 694, 695, 696, 697, 698, 701, 702, 703, 704, 705, 707, 708, 709, 710, 711, 713, 714, 720
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A007091.
Programs
-
Maple
fBC:= proc(b,c) local t,i,j,m; m:= 1/5; t:= 0: for i from 1 to 5 do for j from 1 to c[i] do m:= 5*m; t:= t + b[i]*m; od od; t end proc: F:= proc(n) local Res, a,b,c, q, B,C; Res:= NULL; 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)]; sort([seq(seq(fBC(b,c),b=B),c=combinat:-composition(n,5))]) end proc: op(F(5)),op(F(6)); # Robert Israel, Jan 22 2019
-
Mathematica
Select[Range[1000],Length[Split[IntegerDigits[#,5]]]==5&] (* Harvey P. Dale, Jan 02 2014 *)