%I #15 Feb 05 2021 00:18:05
%S -1,-1,-1,-1,5,5,5,5,5,5,5,5,5,5,10,10,10,10,10,15,15,15,15,15,20,20,
%T 20,20,20,25,25,25,25,25,29,30,30,30,30,33,34,35,35,35,37,38,39,40,40,
%U 41,42,43,44,45,45,46,47,48,49,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50
%N a(n) is the smallest positive integer such that n+a(n) contains the string n-a(n) as a substring. If no such number exists then a(n) = -1.
%C Based on a search limit of 5*10^9 up to n = 200000 the values of n for which no a(n) is found are n = 1,2,3,4. This is likely the complete list of values for which no a(n) exists.
%C The sequence contains long runs of consecutive terms with the same value, resulting in the image for the values having a staircase-like pattern. In the first 200000 terms the longest run is 88890 terms, starting from a(61110), all of which have a(n) = 50000.
%H Scott R. Shannon, <a href="/A341034/a341034.png">Line graph of the terms for n=5..6111</a>.
%e a(5) = 5 as 5+5 = 10 which contains 5-5 = 0 as a substring.
%e a(6) = 5 as 6+5 = 11 which contains 6-5 = 1 as a substring.
%e a(15) = 10 as 15+10 = 25 which contains 15-10 = 5 as a substring.
%e a(35) = 29 as 35+29 = 64 which contains 35-29 = 6 as a substring.
%Y Cf. A341028 (reverse), A341035 (forward and reverse), A339403, A339144, A328095, A333410, A332703.
%K sign,base
%O 1,5
%A _Scott R. Shannon_, Feb 03 2021
|