login
A039109
Numbers whose base-9 representation has the same number of 6's and 7's.
9
0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 53, 61, 69, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 89, 90, 91, 92, 93, 94, 95, 98, 99, 100, 101, 102
OFFSET
1,3
LINKS
MAPLE
q:= n-> (l-> numboccur(l, 6)=numboccur(l, 7))(convert(n, base, 9)):
select(q, [$0..102])[]; # Alois P. Heinz, Mar 25 2026
MATHEMATICA
Select[Range[0, 120], DigitCount[#, 9, 6]==DigitCount[#, 9, 7]&] (* Harvey P. Dale, Jul 10 2019 *)
PROG
(MATLAB) x = 0:21515; d = dec2base(x, 9)-'0'; a = x(sum(d==6, 2)==sum(d==7, 2)); disp(regexprep(num2str(a), ' +', ', ')) % Chris R. Rehmann, Mar 25 2026
CROSSREFS
KEYWORD
nonn,base,easy
STATUS
approved