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.

A178341 Smallest multiple of 3 such that decimals digits 1, ..., k (k = 1, ..., 9) and 0 appear in any order.

This page as a plain text file.
%I A178341 #6 Dec 12 2021 10:24:47
%S A178341 12,12,123,12234,12345,123456,12234567,12345678,123456789,1023456789
%N A178341 Smallest multiple of 3 such that decimals digits 1, ..., k (k = 1, ..., 9) and 0 appear in any order.
%e A178341 4 * 3 = 12
%e A178341 4 * 3 = 12
%e A178341 41 * 3 = 123
%e A178341 4078 * 3 = 12234
%e A178341 4115 * 3 = 12345
%e A178341 41152 * 3 = 123456
%e A178341 4078189 * 3 = 12234567
%e A178341 4115226 * 3 = 12345678
%e A178341 41152263 * 3 = 123456789
%e A178341 341152263 * 3 = 1023456789
%o A178341 (Python)
%o A178341 def a(n):
%o A178341     digset = "".join(str(d) for d in range(1, min(n+1, 11)))
%o A178341     target, lb = set(digset), int(digset) if n < 10 else 1023456789
%o A178341     m = lb if lb%3 == 0 else lb + 3 - lb%3
%o A178341     while target - set(str(m)): m += 3
%o A178341     return m
%o A178341 print([a(n) for n in range(1, 11)]) # _Michael S. Branicky_, Dec 12 2021
%Y A178341 Cf. A178303.
%K A178341 base,easy,fini,full,nonn
%O A178341 1,1
%A A178341 Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), May 25 2010