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 A068679 #28 Aug 20 2024 01:56:57 %S A068679 1,3,7,13,31,49,63,81,91,99,103,109,117,123,151,181,193,213,231,279, %T A068679 319,367,427,459,571,601,613,621,697,721,801,811,951,987,1113,1117, %U A068679 1131,1261,1821,1831,1939,2101,2149,2211,2517,2611,3151,3219,4011,4411,4519,4887,5031,5361,6231,6487,6871,7011,7209,8671,9141,9801,10051 %N A068679 Numbers which yield a prime whenever a 1 is inserted anywhere in them (including at the beginning or end). %C A068679 If R(p) = (10^p-1)/9 is a prime then (10^(p-1)-1)/9 belongs to this sequence. %H A068679 Giovanni Resta, <a href="/A068679/b068679.txt">Table of n, a(n) for n = 1..3314</a> (terms < 2*10^13, first 1929 terms from Chai Wah Wu) %H A068679 C. Caldwell, <a href="http://www.utm.edu/research/primes/">Prime Pages</a> %e A068679 123 belongs to this sequence as the numbers 1123, 1213, 1231 obtained by inserting a 1 in all possible ways are all primes. %t A068679 d[n_]:=IntegerDigits[n]; ins[n_]:=FromDigits/@Table[Insert[d[n],1,k],{k,Length[d[n]]+1}]; Select[Range[10060],And@@PrimeQ/@ins[#] &] (* _Jayanta Basu_, May 20 2013 *) %t A068679 Select[Range[11000],AllTrue[FromDigits/@Table[Insert[ IntegerDigits[ #],1,n],{n,IntegerLength[#]+1}],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 16 2020 *) %o A068679 (Python) %o A068679 from sympy import isprime %o A068679 A068679_list, n = [], 1 %o A068679 while len(A068679_list) < 1000: %o A068679 if isprime(10*n+1): %o A068679 s = str(n) %o A068679 for i in range(len(s)): %o A068679 if not isprime(int(s[:i]+'1'+s[i:])): %o A068679 break %o A068679 else: %o A068679 A068679_list.append(n) %o A068679 n += 1 # _Chai Wah Wu_, Oct 02 2019 %Y A068679 Cf. A068673, A068674, A068677, A069246. %K A068679 base,nonn %O A068679 1,2 %A A068679 _Amarnath Murthy_, Mar 02 2002 %E A068679 More terms from Eli McGowan (ejmcgowa(AT)mail.lakeheadu.ca), Apr 11 2002 %E A068679 More terms from _Vladeta Jovovic_, Apr 16 2002