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.

A334914 Least positive multiple of n that when written in base 10 uses only 0's, 1's, 2's and 3's.

Original entry on oeis.org

1, 2, 3, 12, 10, 12, 21, 32, 333, 10, 11, 12, 13, 112, 30, 32, 102, 1332, 133, 20, 21, 22, 23, 120, 100, 130, 1323, 112, 203, 30, 31, 32, 33, 102, 210, 1332, 111, 1102, 312, 120, 123, 210, 301, 132, 3330, 230, 1222, 1200, 1323, 100, 102, 312, 212, 2322, 110
Offset: 1

Views

Author

Bernard Schott, May 16 2020

Keywords

Comments

a(n) = n iff n is in A007090; there is no isolated fixed point because fixed points are always in patterns of 4 consecutive terms, and the first few patterns are (0,1,2,3), (10,11,12,13), (20,21,22,23), (30,31,32,33), (100,101,102,103) ...

Examples

			a(18) = 1332 because 1332 is the smallest multiple of 18 whose decimal digits are all 0, 1, 2 or 3.
		

Crossrefs

Cf. A004290 (similar, with digits 0 and 1), A181060 (similar, with digits 0, 1 and 2).

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 do if convert(convert(k*n,base,10),set) subset {0,1,2,3} then return k*n fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, May 18 2020
  • Mathematica
    Table[SelectFirst[Rest @ Flatten [FromDigits /@ Tuples[Range[0, 3], 4]], Divisible[#, n] &], {n, 1, 55}] (* Amiram Eldar, May 16 2020 *)
  • PARI
    a(n) = my(k=1); while(vecmax(digits(k*n))>3, k++); k*n \\ Michel Marcus, May 17 2020