OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,base
AUTHOR
STATUS
approved