cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A031959 Numbers with exactly three distinct base-7 digits.

This page as a plain text file.
%I A031959 #18 Aug 10 2021 18:46:54
%S A031959 51,52,53,54,55,63,66,67,68,69,70,72,74,75,76,77,79,80,82,83,84,86,87,
%T A031959 88,90,91,93,94,95,96,99,101,102,103,104,105,108,109,110,111,119,120,
%U A031959 123,124,125,126,127,129,131,132,133,134,136
%N A031959 Numbers with exactly three distinct base-7 digits.
%H A031959 Robert Israel, <a href="/A031959/b031959.txt">Table of n, a(n) for n = 1..10000</a>
%p A031959 f:= proc(d)  uses combinat; local S,Res,A1,A1p,A2,x1,x2;
%p A031959      Res:= NULL:
%p A031959      for S in choose({$0..6},3) do
%p A031959        x1:= S[3]*(7^d-1)/6;
%p A031959        for A1 in powerset(d) minus {{}} do
%p A031959          if S[1]=0 and member(d,A1) then next fi;
%p A031959          x2:= x1 + (S[1]-S[3])*add(7^(j-1),j=A1);
%p A031959          A1p:= {$1..d} minus A1;
%p A031959          for A2 in powerset(A1p) minus {{},A1p} do
%p A031959            Res:= Res, x2 + (S[2]-S[3])*add(7^(j-1),j=A2);
%p A031959          od
%p A031959        od
%p A031959      od;
%p A031959      sort([Res]);
%p A031959 end proc:
%p A031959 op(f(3)),op(f(4)); # _Robert Israel_, Oct 29 2018
%t A031959 Select[Range[150],Length[Union[IntegerDigits[#,7]]]==3&] (* _Harvey P. Dale_, Mar 29 2019 *)
%Y A031959 Cf. A007093.
%K A031959 nonn,base
%O A031959 1,1
%A A031959 _Clark Kimberling_