%I #8 Jun 18 2024 23:11:17
%S 1,1,-1,2,1,-1,1,1,-1,1,5,-1,1,1,-1,2,1,-1,1,2,-1,1,1,-1,3,1,-1,4,2,
%T -1,28,2,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,16,1,-1,1,1,-1,3,2,-1,5,1,-1,
%U 15,1,-1,1,2,-1,12,1,-1,4,2,-1,1,1,-1,1,2,-1,1,3
%N a(n) = smallest number m > 0 such that n followed by m 9's yields a prime, or -1 if no such m exists.
%C a(n) = -1 when n = 3*k because no matter how many 9's are appended to n, the resulting number is always divisible by 3 and therefore cannot be prime.
%C a(n) = -1 when n = 37037*k + 8424, 10175, 10998, 12210, 17600, 19360, 25826, 27146, 27685, 27861, 35915 or 36047, because n followed by any positive number, m say, of 9's is divisible by at least one of the primes {7,11,13,37}.
%C a(4420) > 300000 or a(4420) = -1.
%H Toshitaka Suzuki, <a href="/A373201/b373201.txt">Table of n, a(n) for n = 1..4419</a>
%e a(25)=3 because 259 and 2599 are composite but 25999 is prime.
%Y Cf. A090465, A069568, A372262, A363922.
%K sign,base
%O 1,4
%A _Toshitaka Suzuki_, May 27 2024