A044972 Numbers whose base-3 representation contains exactly one 0 and two 1's.
10, 12, 32, 34, 38, 42, 46, 48, 58, 64, 66, 98, 104, 106, 116, 128, 132, 140, 142, 146, 150, 154, 156, 176, 178, 184, 194, 196, 200, 204, 208, 210, 220, 226, 228, 296, 314, 320, 322, 350, 386, 398, 402, 422, 428, 430, 440, 452
Offset: 1
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[500],DigitCount[#,3,0]==1&&DigitCount[#,3,1]==2&] (* Harvey P. Dale, Aug 19 2019 *)
-
PARI
is(n)=my(d=digits(n,3),fr=vector(3));for(i=1,#d,fr[d[i]+1]++);fr[1]==1&&fr[2]==2 \\ David A. Corneth, Aug 19 2019