login
A039392
Numbers whose base-9 representation has the same nonzero number of 7's and 8's.
9
71, 79, 152, 160, 233, 241, 314, 322, 395, 403, 476, 484, 557, 565, 575, 584, 593, 602, 611, 620, 629, 639, 640, 641, 642, 643, 644, 645, 655, 664, 673, 682, 691, 700, 709, 711, 712, 713, 714, 715, 716, 717, 800, 808, 881, 889, 962, 970, 1043, 1051
OFFSET
1,1
LINKS
MATHEMATICA
b9Q[n_]:=Module[{idn9=IntegerDigits[n, 9]}, Count[idn9, 7]==Count[idn9, 8]!=0]
Select[Range[1100], b9Q] (* Harvey P. Dale, Feb 14 2011 *)
PROG
(MATLAB) x = 0:1051; d = dec2base(x, 9)-'0'; s1 = sum(d==7, 2); s2 = sum(d==8, 2); a = x(s1==s2 & s1>0); disp(regexprep(num2str(a), ' +', ', ')) % Chris R. Rehmann, Apr 14 2026
KEYWORD
nonn,base,easy
STATUS
approved