login
A039369
Numbers whose base-9 representation has the same nonzero number of 1's and 6's.
13
15, 55, 87, 105, 114, 123, 132, 135, 137, 138, 139, 140, 142, 143, 150, 159, 177, 217, 258, 298, 339, 379, 420, 460, 487, 495, 497, 498, 499, 500, 502, 503, 505, 514, 523, 532, 550, 559, 582, 622, 663, 703, 735, 753, 762, 771, 780, 783, 785, 786, 787, 788, 790
OFFSET
1,1
LINKS
MAPLE
filter:= proc(n) local L, a1;
L:= convert(n, base, 9);
a1:= numboccur(1, L);
a1 > 0 and numboccur(6, L)=a1
end proc:
select(filter, [$1..1000]); # Robert Israel, Sep 27 2018
MATHEMATICA
Select[Range[1000], DigitCount[#, 9, 1]==DigitCount[#, 9, 6]>0&] (* Harvey P. Dale, Oct 15 2014 *)
PROG
(MATLAB) x = 0:790; d = dec2base(x, 9)-'0'; s1 = sum(d==1, 2); s2 = sum(d==6, 2); a = x(s1==s2 & s1>0); disp(regexprep(num2str(a), ' +', ', ')) % Chris R. Rehmann, Apr 05 2026
KEYWORD
nonn,base,easy
STATUS
approved