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.

A331475 a(n) is the smallest n-digit number using each digit 0 to n-1 once, such that the numbers formed by its last k digits are divisible by k, (k = 1..n).

Original entry on oeis.org

0, 10, 102, 3012, 13240, 123540, 3516240, 16453720, 123567480, 9123567480
Offset: 1

Views

Author

Eduardo P. Feitosa, May 03 2020

Keywords

Comments

a(n) = A147636(n) for n=1, 2, 3, 9 and 10.

Examples

			a(3) = 3012 because 2, 12, 012, 3012 are divisible by 1, 2, 3, 4 and it is the least such number with distinct digits 0 to 3.
		

Crossrefs

Programs

  • Mathematica
    ok[n_] := AllTrue[Range@ IntegerLength@ n, Mod[ Mod[n, 10^#], #] == 0 &]; a[n_] := SelectFirst[ FromDigits /@ Permutations[Range[0, n-1]], # >= 10^(n-1) - 1 && ok[#] &]; Array[a, 10] (* Giovanni Resta, May 04 2020 *)