login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A226219
Least k > 1 not a power of 10 such that n is a substring of k*n.
1
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, 5, 51, 101, 26, 79, 11, 101, 26, 101, 51, 21, 26, 101, 51, 87, 6, 59, 34, 101, 26, 21, 51, 74, 26, 51, 3, 69, 26, 29, 51, 21, 26, 101, 51, 27, 6, 92, 51, 26, 26, 21
OFFSET
0,1
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
Cf. A045537.
Sequence in context: A158616 A127821 A114724 * A285866 A165768 A323783
KEYWORD
base,nonn
AUTHOR
Paul Tek, May 31 2013
STATUS
approved