login
A039371
Numbers whose base-9 representation has the same nonzero number of 1's and 8's.
15
17, 73, 89, 107, 116, 125, 134, 143, 152, 153, 155, 156, 157, 158, 159, 160, 179, 235, 260, 316, 341, 397, 422, 478, 503, 559, 584, 640, 649, 657, 659, 660, 661, 662, 663, 664, 667, 676, 685, 694, 703, 712, 737, 755, 764, 773, 782, 791, 800, 801, 803, 804, 805
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[805], DigitCount[#, 9, 1]==DigitCount[#, 9, 8]>0&] (* Chris R. Rehmann, Apr 06 2026 *)
PROG
(MATLAB) x = 0:805; d = dec2base(x, 9)-'0'; s1 = sum(d==1, 2); s2 = sum(d==8, 2); a = x(s1==s2 & s1>0); disp(regexprep(num2str(a), ' +', ', ')) % Chris R. Rehmann, Apr 06 2026
KEYWORD
nonn,base,easy
STATUS
approved