%I #17 Jun 30 2021 03:56:35
%S 58,85,158,185,258,285,358,385,458,485,508,518,528,538,548,568,578,
%T 580,581,582,583,584,586,587,589,598,658,685,758,785,805,815,825,835,
%U 845,850,851,852,853,854,856,857,859,865,875,895,958,985,1058,1085
%N Numbers whose base-10 representation has the same nonzero number of 5's and 8's.
%H David A. Corneth, <a href="/A039430/b039430.txt">Table of n, a(n) for n = 1..10000</a>
%t Select[Range[1100],DigitCount[#,10,5]==DigitCount[#,10,8]>0&] (* _Harvey P. Dale_, Apr 18 2019 *)
%o (PARI) is(n) = my(d=digits(n), sis5=#setintersect(vecsort(d), vector(#d, x, 5)), sis8=#setintersect(vecsort(d), vector(#d, x, 8))); sis5 > 0 && sis5==sis8 \\ _Felix Fröhlich_, Apr 18 2019
%K nonn,base,easy
%O 1,1
%A _Olivier Gérard_
|