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.

A226219 Least k > 1 not a power of 10 such that n is a substring of k*n.

This page as a plain text file.
%I A226219 #11 Apr 25 2016 12:00:15
%S A226219 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 A226219 5,51,101,26,79,11,101,26,101,51,21,26,101,51,87,6,59,34,101,26,21,51,
%U A226219 74,26,51,3,69,26,29,51,21,26,101,51,27,6,92,51,26,26,21
%N A226219 Least k > 1 not a power of 10 such that n is a substring of k*n.
%H A226219 Paul Tek, <a href="/A226219/b226219.txt">Table of n, a(n) for n = 0..10000</a>
%F A226219 a(n) <= 10^A055642(n)+1.
%t A226219 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 A226219 (Perl) sub a {
%o A226219     my $n = shift;
%o A226219     my $k = 2;
%o A226219     while (1) {
%o A226219         if ($k !~ /^10+$/) {
%o A226219             if (index($k*$n, $n)>=0) {
%o A226219                 return $k;
%o A226219             }
%o A226219         }
%o A226219         $k++;
%o A226219     }
%o A226219 }
%o A226219 (Haskell)
%o A226219 import Data.List (isInfixOf, isPrefixOf)
%o A226219 a226219 n = head [k | k <- [2..],
%o A226219                       isInfixOf (show n) (show (k*n)), not $ p10 k]
%o A226219    where p10 = flip isPrefixOf ('1' : repeat '0') . show  :: Int -> Bool
%o A226219 -- _Reinhard Zumkeller_, May 31 2013
%Y A226219 Cf. A045537.
%K A226219 base,nonn
%O A226219 0,1
%A A226219 _Paul Tek_, May 31 2013