[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Numbers with exactly three distinct base-7 digits.
2

%I #18 Aug 10 2021 18:46:54

%S 51,52,53,54,55,63,66,67,68,69,70,72,74,75,76,77,79,80,82,83,84,86,87,

%T 88,90,91,93,94,95,96,99,101,102,103,104,105,108,109,110,111,119,120,

%U 123,124,125,126,127,129,131,132,133,134,136

%N Numbers with exactly three distinct base-7 digits.

%H Robert Israel, <a href="/A031959/b031959.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(d) uses combinat; local S,Res,A1,A1p,A2,x1,x2;

%p Res:= NULL:

%p for S in choose({$0..6},3) do

%p x1:= S[3]*(7^d-1)/6;

%p for A1 in powerset(d) minus {{}} do

%p if S[1]=0 and member(d,A1) then next fi;

%p x2:= x1 + (S[1]-S[3])*add(7^(j-1),j=A1);

%p A1p:= {$1..d} minus A1;

%p for A2 in powerset(A1p) minus {{},A1p} do

%p Res:= Res, x2 + (S[2]-S[3])*add(7^(j-1),j=A2);

%p od

%p od

%p od;

%p sort([Res]);

%p end proc:

%p op(f(3)),op(f(4)); # _Robert Israel_, Oct 29 2018

%t Select[Range[150],Length[Union[IntegerDigits[#,7]]]==3&] (* _Harvey P. Dale_, Mar 29 2019 *)

%Y Cf. A007093.

%K nonn,base

%O 1,1

%A _Clark Kimberling_