A045110 Numbers whose base-4 representation contains no 1's and exactly one 3.
3, 11, 12, 14, 35, 43, 44, 46, 48, 50, 56, 58, 131, 139, 140, 142, 163, 171, 172, 174, 176, 178, 184, 186, 192, 194, 200, 202, 224, 226, 232, 234, 515, 523, 524, 526, 547, 555, 556, 558, 560, 562, 568, 570, 643, 651, 652, 654, 675
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(i,x,d) local j,X, nX; X:= convert(x,base,2); nX:= nops(X); 3*4^i+add(X[j]*2*4^`if`(j<=i,j-1,j),j=1..nX) end proc: sort([seq(seq(seq(f(i,x,d),x=`if`(i=d-1,0,2^(d-2))..2^(d-1)-1),i=0..d-1),d=0..6)]); # Robert Israel, Apr 10 2018
-
Mathematica
Select[Range[700],DigitCount[#,4,1]==0&&DigitCount[#,4,3]==1&] (* Harvey P. Dale, Jul 23 2018 *)
Comments