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.

A043356 Numbers having four 1's in base 5.

Original entry on oeis.org

156, 656, 756, 776, 780, 782, 783, 784, 786, 791, 796, 806, 831, 856, 906, 1031, 1156, 1406, 2031, 2656, 3156, 3256, 3276, 3280, 3282, 3283, 3284, 3286, 3291, 3296, 3306, 3331, 3356, 3406, 3531, 3656, 3756, 3776, 3780
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007091 (numbers in base 5).

Programs

  • Maple
    F:= proc(d,m) option remember;
      local A,B;
      if m > d then return [] fi;
      if d = 0 then return [0] fi;
      A:= seq(seq(seq(t+i*5^(d-1),t=procname(dd,m)),dd = 0..d-1),i=2..4);
      if m = 0 then [A]
      else [seq(seq(t+5^(d-1),t=procname(dd,m-1)),dd=0..d-1),A]
      fi
    end proc:
    map(op,[seq(F(d,4),d=4..6)]); # Robert Israel, Jul 02 2018
  • Mathematica
    Select[Range[4000],DigitCount[#,5,1]==4&] (* Harvey P. Dale, Apr 28 2025 *)
  • PARI
    isok(n) = #select(x->(x==1), digits(n, 5)) == 4; \\ Michel Marcus, Jul 02 2018