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.

A043432 Numbers having four 2's in base 8.

This page as a plain text file.
%I A043432 #18 Apr 24 2021 17:42:19
%S A043432 1170,5266,8338,8850,9234,9298,9346,9354,9360,9361,9363,9364,9365,
%T A043432 9366,9367,9370,9378,9386,9394,9402,9426,9490,9554,9618,9682,9874,
%U A043432 10386,10898,11410,11922,13458,17554,21650,25746,29842
%N A043432 Numbers having four 2's in base 8.
%H A043432 Robert Israel, <a href="/A043432/b043432.txt">Table of n, a(n) for n = 1..10000</a>
%p A043432 F:= proc(d) local r, L,M,S, Res; # to get all terms < 8^d
%p A043432    Res:= NULL;
%p A043432    for S in combinat:-choose(d,d-4) do
%p A043432      L:= Vector(d,2);
%p A043432      for r from 0 to 7^(d-4)-1 do
%p A043432        M:= subs(2=7,convert(r+7^(d-4),base,7)[1..d-4]);
%p A043432        L[S]:= Vector(M);
%p A043432        Res:= Res, add(8^(i-1)*L[i],i=1..d);
%p A043432      od
%p A043432    od;
%p A043432    sort([Res]);
%p A043432 end proc:
%p A043432 F(6); # _Robert Israel_, Mar 20 2018
%t A043432 Select[Range[0, 30000], DigitCount[#, 8, 2]==4 &] (* _Vincenzo Librandi_, Mar 21 2018 *)
%o A043432 (PARI) isok(n) = #select(x->(x==2), digits(n, 8)) == 4; \\ _Michel Marcus_, Mar 21 2018
%Y A043432 Cf. A007094.
%K A043432 nonn,base
%O A043432 1,1
%A A043432 _Clark Kimberling_