[go: up one dir, main page]

login
A039421
Numbers whose base-10 representation has the same nonzero number of 3's and 8's.
1
38, 83, 138, 183, 238, 283, 308, 318, 328, 348, 358, 368, 378, 380, 381, 382, 384, 385, 386, 387, 389, 398, 438, 483, 538, 583, 638, 683, 738, 783, 803, 813, 823, 830, 831, 832, 834, 835, 836, 837, 839, 843, 853, 863, 873, 893, 938, 983, 1038, 1083
OFFSET
1,1
MATHEMATICA
Select[Range[1000], DigitCount[#, 10, 3] == DigitCount[#, 10, 8] > 0 &] (* Wesley Ivan Hurt, Nov 21 2017 *)
PROG
(PARI) is(n) = { my(d = digits(n), i = 0, j = 0); for(x=1, length(d), if(d[x] == 3, i++, if(d[x] == 8, j++))); return(i==j && i!=0); } \\ Iain Fox, Nov 21 2017
CROSSREFS
Sequence in context: A160846 A219999 A219997 * A043244 A044024 A133529
KEYWORD
nonn,base,easy
STATUS
approved