login
A039360
Numbers whose base-9 representation has the same nonzero number of 0's and 4's.
12
36, 85, 117, 166, 198, 247, 279, 325, 326, 327, 329, 330, 331, 332, 333, 342, 351, 369, 378, 387, 396, 409, 441, 490, 522, 571, 603, 652, 684, 742, 751, 760, 766, 767, 768, 770, 771, 772, 773, 778, 787, 796, 805, 814, 846, 895, 927, 976, 1008, 1054, 1055, 1056
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[1100], DigitCount[#, 9, 0]==DigitCount[#, 9, 4]>0&] (* Harvey P. Dale, May 22 2018 *)
PROG
(MATLAB)
a = NaN(52, 1); k = 0; j = 1;
while any(isnan(a))
d = dec2base(k, 9)-'0';
n1 = sum(d==0); n2 = sum(d==4);
if n1==n2 && n1 > 0
a(j) = k; j = j+1;
end
k = k+1;
end
disp(regexprep(num2str(a'), ' +', ', ')) % Chris R. Rehmann, Apr 03 2026
KEYWORD
nonn,base,easy
STATUS
approved