%I #31 Jan 27 2021 05:33:48
%S -1,2,-1,68,-1,-1,-1,44,-1,890,110,60,44,35,30,27,25,23,22,20,929,19,
%T 18,88,17,-1,16,16,68,15,15,60,58,56,14,14,14,371,48,360,336,562,9104,
%U 8,13,13,283,39,269,450,37,452,245,18,679,34,225,33,2053,12,12,12,12,12,30,369,889,4,16961
%N a(n) is the smallest positive integer such that n*a(n) contains n+a(n) as a substring. If no such number exists then a(n) = -1.
%C For n = 1, 3, 5, 6, 7, 9, 26 no value has been found for which n*a(n) contains n + a(n) as a substring (obviously true for n = 1) for a(n) up to 5x10^10. It is likely, although unproven, that this is the complete list of values for which a(n) = -1.
%C The sequence values display erratic behavior. Most of the term values appear random but there are ranges of n values with the same value. The largest such range for the first one million terms is a(501000) to a(501499), 500 terms, all of which have a(n) = 1002. Patterns also appear for n value corresponding to multiples of powers-of-ten. For example if n=10^k then a(n) = 89*10^k. The largest value in the first one million terms is a(554635) = 879948670.
%H Scott R. Shannon, <a href="/A339144/b339144.txt">Table of n, a(n) for n = 1..20000</a>.
%e a(2) = 2 as 2*2 = 4 which contains 2 + 2 = 4 as a substring.
%e a(4) = 68 as 4*68 = 272 which contains 4+68 = 72 as a substring.
%e a(69) = 16961 as 69*16961 = 1170309 which contains 69+16961 = 17030 as a substring.
%e a(501000) = 1002 as 501000*1002 = 502002000 which contains 501000+1002 = 502002 as a substring. This is the first of 500 consecutive terms with a(n) = 1002.
%e a(554635) = 879948670 as 554635*879948670 = 488050330585450 which contain 554635+879948670 = 880503305 as a substring. This is the largest value of a(n) for the first one million terms.
%o (PARI) isok(n, k) = #strsplit(Str(n*k), Str(n+k)) > 1;
%o a(n) = {if (vecsearch([1, 3, 5, 6, 7, 9, 26], n), return (-1)); my(k=1); while (! isok(k, n), k++); k;} \\ _Michel Marcus_, Dec 02 2020 and Jan 23 2021
%Y Cf. A339107, A063427, A063428, A328095, A333923, A332580.
%K sign,base,look
%O 1,2
%A _Scott R. Shannon_, Nov 25 2020