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 A090584 #20 Jun 08 2025 16:15:42 %S A090584 1,0,0,1,0,-1,0,1,-1,1,0,-1,0,2,-1,1,0,-1,0,3,-1,1,0,-1,8,1,-1,1,0,-1, %T A090584 0,4,-1,2,1,-1,0,1,-1,483,0,-1,0,1,-1,1,0,-1,2,1,-1,1,0,-1,3,1,-1,6,0, %U A090584 -1,0,5,-1,1,1,-1,0,1,-1,5,0,-1,0,1,-1,3,1,-1,0,4,-1,1,0,-1,1,1,-1,1,0,-1,2,3,-1,2,1,-1,0,1,-1,3,0,-1,0,2,-1,1,0,-1,0,1 %N A090584 Smallest number m >= 0 such that n with m threes appended yields a prime or -1 if no such m exists. %C A090584 a(n) = 0 if n is already prime. a(n) = -1 for n = any multiple of 3 other than 3 itself. The first 5 record holders in this sequence are 1, 14, 20, 25, 40 with the values 1, 2, 3, 8, 483 respectively. 410 may be the next record holder as no solution has been found for it yet. 410 was tested out to 1250 threes with no prime formed. %C A090584 From _Toshitaka Suzuki_, May 19 2024: (Start) %C A090584 The first 6 record holders in this sequence are 1, 14, 20, 25, 40, 410 with the values 1, 2, 3, 8, 483, 37398 respectively. 817 may be the next record holder as no solution has been found for it yet. 817 was tested out to 300000 threes with no prime formed. %C A090584 a(n) = -1 when n = 37037*k + 2808, 3666, 4070, 9287, 18799, 21574, 28083, 30558, 33300, 33740, 36663 or 36707, because n followed by any positive number, m say, of 3's is divisible by at least one of the primes {7,11,13,37}. (End) %H A090584 Toshitaka Suzuki, <a href="/A090584/b090584.txt">Table of n, a(n) for n = 1..816</a> %e A090584 a(25) = 8 because eight 3's must be appended to 25 before a prime is formed (2533333333). %e A090584 a(6) = -1 because no matter how many 3's are appended to 6, the resulting number is always divisible by 3 and can therefore not be prime. [Similarly for any larger multiple of 3. - _M. F. Hasler_, Jun 06 2024] %o A090584 (PARI) apply( {A090584(n, LIM=500)=n%3 && for(m=0, LIM, ispseudoprime(n) && return(m); n=n*10+3); -(n>3)}, [1..55]) \\ Retun value -1 means that a(n) = -1 or, for non-multiples of 3, a(n) > LIM, the search limit given as 2nd (optional) parameter. - _M. F. Hasler_, Jun 05 2024 %Y A090584 Cf. A372262 (m > 0). %Y A090584 Cf. A083747 (The Wilde Primes, i.e. same operation using ones), A090464 (using sevens), A090465 (using nines). %K A090584 base,sign %O A090584 1,14 %A A090584 _Chuck Seggelin_, Dec 02 2003 %E A090584 Name edited by _M. F. Hasler_, Jun 06 2024