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 A304247 #24 Feb 29 2020 02:31:58 %S A304247 0,1,2,3,4,5,6,7,8,9,17,23,27,29,41,51,53,77,81,83,87,89,99,101,113, %T A304247 123,129,131,137,149,183,207,221,243,251,297,303,321,329,357,359,399, %U A304247 401,417,419,429,441,443,453,461,471,473,527,533,581,597,611,621 %N A304247 Numbers which yield a prime whenever a '2' is inserted between any single pair of adjacent digits. %C A304247 Motivated by existing sequences defined in an analog way for other digits to be inserted, e.g., A164329 for the digit 0, cf. cross-references. %C A304247 For single-digit terms, the condition is voidly satisfied: nothing can be inserted. %C A304247 See also A050712 where 2 is inserted between each pair of adjacent digits. - _R. J. Mathar_, Feb 28 2020 %H A304247 Chai Wah Wu, <a href="/A304247/b304247.txt">Table of n, a(n) for n = 1..10000</a> %e A304247 123 is in the sequence because it yields a prime when a '2' is inserted after the first or after the second digit, which yields the prime 1223 in both cases. The term itself does not need to be prime. %p A304247 filter:= proc(n) local j,t; %p A304247 for j from 1 to ilog10(n) do %p A304247 if not isprime(10*n-9*(n mod 10^j)+2*10^j) then return false fi %p A304247 od; %p A304247 true %p A304247 end proc: %p A304247 select(filter, [$0..10000]); # _Robert Israel_, Jun 01 2018 %o A304247 (PARI) is(n,p=2,L=logint(n+!n,10)+1,d,P)=!for(k=1,L-1,isprime((d=divrem(n,P=10^(L-k)))[2]+(10*d[1]+p)*P)||return) %Y A304247 Cf. A164329 (prime when 0 is inserted anywhere), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (0 is inserted between all digits). %Y A304247 Cf. A068679 (1 is prefixed, appended or inserted anywhere), A069246 (primes among these), A068673 (1 is prefixed, or appended), A304246 (1 is inserted anywhere). %Y A304247 Cf. A158594 (3 is prefixed, appended or inserted anywhere), A215419 (primes among these). %Y A304247 Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended). %Y A304247 Cf. A069833 (9 is prefixed, appended or inserted anywhere), A215421 (primes among these). %Y A304247 Cf. A158232 (13 is prefixed or appended). %Y A304247 Cf. A304243 (2 is prefixed or prime(k+2) is inserted after the k-th digit), A304244 (prime(k) is inserted after the k-th digit), A304245 (prime(k+1) is inserted after the k-th digit, k > 1, or '2' after the first digit). %K A304247 nonn,base %O A304247 1,3 %A A304247 _M. F. Hasler_, Jun 01 2018