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 A256481 #11 May 22 2025 10:21:42 %S A256481 2,11,23,31,41,53,61,71,83,97,101,113,127,131,149,151,163,173,181,191, %T A256481 2011,211,223,233,241,251,263,271,281,293,307,311,3299,331,347,353, %U A256481 367,373,383,397,401,419,421,431,443,457,461,479,487,491,503,511111,521,5333 %N A256481 Smallest prime obtained by appending a number with identical digits to n or 0 if no such prime exists. %C A256481 For n <= 15392, a(n) = 0 if and only if n = 6930. Conjecture: if a(n) = 0, then n is divisible by 3. Conjecture verified for n <= 10^6. a(n) = 0 for n = 6930, 50358, 56574, 72975. %H A256481 Chai Wah Wu, <a href="/A256481/b256481.txt">Table of n, a(n) for n = 0..6068</a> %H A256481 Chai Wah Wu, <a href="http://arxiv.org/abs/1503.08883">On a conjecture regarding primality of numbers constructed from prepending and appending identical digits</a>, arXiv:1503.08883 [math.NT], 2015. %o A256481 (Python) %o A256481 from gmpy2 import mpz, digits, is_prime %o A256481 def A256481(n,limit=2000): %o A256481 if n in (6930,50358,56574,72975): %o A256481 return 0 %o A256481 if n == 0: %o A256481 return 2 %o A256481 sn = str(n) %o A256481 for i in range(1,limit+1): %o A256481 for j in range(1,10,2): %o A256481 si = digits(j,10)*i %o A256481 p = mpz(sn+si) %o A256481 if is_prime(p): %o A256481 return int(p) %o A256481 else: %o A256481 return 'search limit reached.' %Y A256481 Cf. A090287, A256480, A030665. %K A256481 nonn,base %O A256481 0,1 %A A256481 _Chai Wah Wu_, Mar 31 2015