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.
%I A083747 #20 Jun 06 2024 11:27:33 %S A083747 1,0,0,1,0,1,0,2,2,1,0,136,0,9,1,3,0,1,0,2,1,3,0,1,1,3,1,1,0,2,0,35,1, %T A083747 6,2,4,0,-1,2,1,0,1,0,3,772,1,0,5,1,2,4,1,0,1,31,18470,1,3,0,1,0,2,1, %U A083747 1,3,1,0,3,1,1,0,2,0,2,1,1,9,4,0,2,1,1,0,5,6,3,149,1,0,2,1,3,2,1,2,7,0,2,1,10,0,1,0,44,1,1,0,5,0,17,16,3,0,2,1,9,1,1,5,1 %N A083747 Smallest number m >= 0 such that n followed by m ones yields a prime; a(p) = -1 if no such m exists. %C A083747 a(38) = -1 means no prime has yet been found; a(176) = -1 because it has been proved never to reach a prime. a(45) = 772 and a(56) = 18470 found by Richard Heylen; a(45) has been proved prime while a(56) is 3-PRP. %C A083747 Number of times 1 has to be repeatedly appended to n to form a prime. - _Lekraj Beedassy_, Jun 01 2006 %C A083747 The statement "no prime has yet been found" is misleading: if a(n) was unknown, the terms listed here should stop at a(n-1). A term a(n) = -1 means it can be proven that it will never yield a prime. We can show this for n = 38, see Examples. - _M. F. Hasler_, Jun 05 2024 %H A083747 Toshitaka Suzuki, <a href="/A083747/b083747.txt">Table of n, a(n) for n = 1..602</a> %H A083747 Jon Perry, <a href="https://web.archive.org/web/20070220134129/http://www.users.globalnet.co.uk/~perry/maths/wildeprimes/wildeprimes.htm">Wilde Primes</a> (backup on web.archive.org as of Feb. 2007, ceased to exist in 2007). %e A083747 a(8) = 2 because 8 and 81 are composite but 811 is prime. %e A083747 From _M. F. Hasler_, Jun 05 2024: (Start) %e A083747 For n = 38, a(38) = -1 because the number 38 with m ones appended is divisible by 3 whenever m == 1 (mod 3) and by 37 for m == 2 (mod 3), and for m = 3k, k >= 0, it equals (x^3 - 1)/9 = (x - 1)/3 * (x^2 + x + 1)/3 with x = 7*10^k. %e A083747 For n = 176, a(176) = -1 because appending any number m of 1's will always yield a number divisible by 11 if m is even, by 3 if m == 1 (mod 3), by 7 if m == 5 (mod 6) or by 13 if m == 3 (mod 6). (End) %o A083747 (PARI) { aop(n, stop=500) = for(c=0, stop, isprime(n) && return(c); n=n*10+1); -1 } \\ Return value -1 means that a(n) = -1 or a(n) > stop, the search limit given as 2nd optional parameter. %Y A083747 Cf. A069568. %K A083747 base,sign %O A083747 1,8 %A A083747 _Jason Earls_, Jun 16 2003 %E A083747 Definition and PARI/GP code edited by _M. F. Hasler_, Jun 05 2024