The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 1

%I #38 May 04 2020 04:57:35

%S 0,10,102,3012,13240,123540,3516240,16453720,123567480,9123567480

%N 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).

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

%e 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.

%t 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 *)

%Y Cf. A147636, A158242, A220491.

%K base,fini,full,nonn

%O 1,2

%A _Eduardo P. Feitosa_, May 03 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 13:48 EDT 2024. Contains 373128 sequences. (Running on oeis4.)