Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Apr 25 2016 12:00:15
%S 2,11,6,11,6,3,6,11,6,11,11,101,26,87,51,21,26,69,51,63,6,58,51,97,26,
%T 5,51,101,26,79,11,101,26,101,51,21,26,101,51,87,6,59,34,101,26,21,51,
%U 74,26,51,3,69,26,29,51,21,26,101,51,27,6,92,51,26,26,21
%N Least k > 1 not a power of 10 such that n is a substring of k*n.
%H Paul Tek, <a href="/A226219/b226219.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) <= 10^A055642(n)+1.
%t Table[k = 2; While[IntegerQ[Log[10, k]] || StringPosition[ToString[k*n], ToString[n], 1] == {}, k++]; k, {n, 0, 100}] (* _T. D. Noe_, May 31 2013 *)
%o (Perl) sub a {
%o my $n = shift;
%o my $k = 2;
%o while (1) {
%o if ($k !~ /^10+$/) {
%o if (index($k*$n, $n)>=0) {
%o return $k;
%o }
%o }
%o $k++;
%o }
%o }
%o (Haskell)
%o import Data.List (isInfixOf, isPrefixOf)
%o a226219 n = head [k | k <- [2..],
%o isInfixOf (show n) (show (k*n)), not $ p10 k]
%o where p10 = flip isPrefixOf ('1' : repeat '0') . show :: Int -> Bool
%o -- _Reinhard Zumkeller_, May 31 2013
%Y Cf. A045537.
%K base,nonn
%O 0,1
%A _Paul Tek_, May 31 2013