login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A045135
Numbers whose base-4 representation contains no 2's and exactly two 3's.
1
15, 31, 51, 55, 60, 61, 79, 95, 115, 119, 124, 125, 195, 199, 204, 205, 211, 215, 220, 221, 240, 241, 244, 245, 271, 287, 307, 311, 316, 317, 335, 351, 371, 375, 380, 381, 451, 455, 460, 461, 467, 471, 476, 477, 496, 497, 500
OFFSET
1,1
LINKS
MAPLE
f:= proc(d) # for terms < 4^d
local L, x1, x2, i, S, R;
R:= NULL;
for x2 from 1 to d-1 do
for x1 from 0 to x2-1 do
for S in combinat:-powerset({$0..x1-1, $x1+1..x2-1, $x2+1..d-1}) do
R:= R, add(4^i, i=S)+3*4^x1+3*4^x2;
od od od:
sort([R]);
end proc:
f(5); # Robert Israel, Feb 25 2021
MATHEMATICA
Select[Range[500], DigitCount[#, 4, 2]==0&&DigitCount[#, 4, 3]==2&] (* Harvey P. Dale, Jul 24 2016 *)
PROG
(PARI) isok(k) = my(d=digits(k, 4)); (#select(x->(x==2), d) == 0) && (#select(x->(x==3), d) == 2); \\ Michel Marcus, Feb 25 2021
CROSSREFS
Cf. A007090 (numbers in base 4).
Sequence in context: A044457 A249452 A132757 * A283122 A195046 A324631
KEYWORD
nonn,base
STATUS
approved