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.

A223475 Least k such that the decimal representation of k*n has digits in nonincreasing order.

This page as a plain text file.
%I A223475 #11 Mar 26 2013 14:07:28
%S A223475 1,1,1,1,1,1,1,1,1,1,1,5,4,3,2,2,3,3,4,1,1,1,4,3,2,2,2,3,3,1,1,1,1,13,
%T A223475 2,2,2,2,17,1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,15,13,9,9,1,1,1,1,1,1,1,
%U A223475 13,8,8,1,1,1,1,1,1,1,1,84,7,1,1,1,1,1,1,1,1,1,86,1,1,1,1,1,1,1,1,1,1,1,11,5,7,5,2,5,3,4,6,1,1,75,47,38,8,45,56,8,7,5,55,5,7
%N A223475 Least k such that the decimal representation of k*n has digits in nonincreasing order.
%H A223475 Giovanni Resta, <a href="/A223475/b223475.txt">Table of n, a(n) for n = 1..2000</a>
%e A223475 39*17 = 663 has digits in nonincreasing order, and no k < 17 has this property, hence a(39) = 17.
%t A223475 a[n_] := a[nn_] := Block[{n = nn, f, w = Range@9, k = 1}, While[Mod[n, 10] == 0, n /= 10]; While[(f = Select[w, Max@ Differences@ IntegerDigits[n*#] <= 0 &, 1]) == {}, k++; w = Union@ Flatten@Table[ Select[d*10^(k-1) + w, Max@ Differences@ IntegerDigits[Mod[n*#, 10^k], 10, k] <= 0 &], {d, 0, 9}]]; f[[1]]]; Array[a, 123] (* faster than basic approach. _Giovanni Resta_, Mar 26 2013 *)
%Y A223475 a(n)*n yields sequence A223474.
%Y A223475 Cf. A079339, A181061.
%Y A223475 Cf. A009996.
%K A223475 nonn,base
%O A223475 1,12
%A A223475 _Paul Tek_, Mar 20 2013