OFFSET
1,2
COMMENTS
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.
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.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..20000.
EXAMPLE
a(2) = 2 as 2*2 = 4 which contains 2 + 2 = 4 as a substring.
a(4) = 68 as 4*68 = 272 which contains 4+68 = 72 as a substring.
a(69) = 16961 as 69*16961 = 1170309 which contains 69+16961 = 17030 as a substring.
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.
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.
PROG
(PARI) isok(n, k) = #strsplit(Str(n*k), Str(n+k)) > 1;
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
CROSSREFS
KEYWORD
AUTHOR
Scott R. Shannon, Nov 25 2020
STATUS
approved