OFFSET
0,1
LINKS
Paul Tek, Table of n, a(n) for n = 0..10000
FORMULA
a(n) <= 10^A055642(n)+1.
MATHEMATICA
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 *)
PROG
(Perl) sub a {
my $n = shift;
my $k = 2;
while (1) {
if ($k !~ /^10+$/) {
if (index($k*$n, $n)>=0) {
return $k;
}
}
$k++;
}
}
(Haskell)
import Data.List (isInfixOf, isPrefixOf)
a226219 n = head [k | k <- [2..],
isInfixOf (show n) (show (k*n)), not $ p10 k]
where p10 = flip isPrefixOf ('1' : repeat '0') . show :: Int -> Bool
-- Reinhard Zumkeller, May 31 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Paul Tek, May 31 2013
STATUS
approved