login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A039430
Numbers whose base-10 representation has the same nonzero number of 5's and 8's.
1
58, 85, 158, 185, 258, 285, 358, 385, 458, 485, 508, 518, 528, 538, 548, 568, 578, 580, 581, 582, 583, 584, 586, 587, 589, 598, 658, 685, 758, 785, 805, 815, 825, 835, 845, 850, 851, 852, 853, 854, 856, 857, 859, 865, 875, 895, 958, 985, 1058, 1085
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[1100], DigitCount[#, 10, 5]==DigitCount[#, 10, 8]>0&] (* Harvey P. Dale, Apr 18 2019 *)
PROG
(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
CROSSREFS
Sequence in context: A127334 A275702 A306115 * A043253 A044033 A266451
KEYWORD
nonn,base,easy
STATUS
approved