login
A334914
Least positive multiple of n that when written in base 10 uses only 0's, 1's, 2's and 3's.
2
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,2
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) ...
LINKS
EXAMPLE
a(18) = 1332 because 1332 is the smallest multiple of 18 whose decimal digits are all 0, 1, 2 or 3.
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 *)
PROG
(PARI) a(n) = my(k=1); while(vecmax(digits(k*n))>3, k++); k*n \\ Michel Marcus, May 17 2020
CROSSREFS
Cf. A004290 (similar, with digits 0 and 1), A181060 (similar, with digits 0, 1 and 2).
Sequence in context: A112979 A225723 A092972 * A261576 A081526 A075711
KEYWORD
nonn,base
AUTHOR
Bernard Schott, May 16 2020
STATUS
approved