login
A039080
Numbers whose base-9 representation has the same number of 0's and 4's.
12
1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 14, 15, 16, 17, 19, 20, 21, 23, 24, 25, 26, 28, 29, 30, 32, 33, 34, 35, 36, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 59, 60, 61, 62, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 77, 78, 79, 80, 85, 91, 92, 93, 95, 96, 97, 98, 100, 101, 102, 104
OFFSET
1,2
LINKS
MATHEMATICA
Select[Range[150], DigitCount[#, 9, 0]==DigitCount[#, 9, 4]&] (* Harvey P. Dale, Sep 05 2013 *)
PROG
(MATLAB)
a = NaN(10000, 1); k = 0; j = 1;
while any(isnan(a))
d = dec2base(k, 9)-'0';
if sum(d==0)==sum(d==4)
a(j) = k; j = j+1;
end
k = k+1;
end
disp(regexprep(num2str(a'), ' +', ', ')) % Chris R. Rehmann, Mar 01 2026
KEYWORD
nonn,base,easy
STATUS
approved