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.

Original entry on oeis.org

1170, 5266, 8338, 8850, 9234, 9298, 9346, 9354, 9360, 9361, 9363, 9364, 9365, 9366, 9367, 9370, 9378, 9386, 9394, 9402, 9426, 9490, 9554, 9618, 9682, 9874, 10386, 10898, 11410, 11922, 13458, 17554, 21650, 25746, 29842
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007094.

Programs

  • Maple
    F:= proc(d) local r, L,M,S, Res; # to get all terms < 8^d
       Res:= NULL;
       for S in combinat:-choose(d,d-4) do
         L:= Vector(d,2);
         for r from 0 to 7^(d-4)-1 do
           M:= subs(2=7,convert(r+7^(d-4),base,7)[1..d-4]);
           L[S]:= Vector(M);
           Res:= Res, add(8^(i-1)*L[i],i=1..d);
         od
       od;
       sort([Res]);
    end proc:
    F(6); # Robert Israel, Mar 20 2018
  • Mathematica
    Select[Range[0, 30000], DigitCount[#, 8, 2]==4 &] (* Vincenzo Librandi, Mar 21 2018 *)
  • PARI
    isok(n) = #select(x->(x==2), digits(n, 8)) == 4; \\ Michel Marcus, Mar 21 2018