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 A138248 #19 Sep 08 2022 08:45:33 %S A138248 11,29,59,71,181,199,241,251,431,491,809,991,1051,1109,1151,1231,1249, %T A138248 1289,1319,1459,1571,1931,1949,2099,2411,2729,2909,2939,3301,3461, %U A138248 3499,3511,3881,3889,4201,4231,4651,4679,4721,4889,5011,5081,5209,5639,6299 %N A138248 Prime numbers k such that 18*k - 1 and 18*k + 1 are twin primes. %H A138248 Amiram Eldar, <a href="/A138248/b138248.txt">Table of n, a(n) for n = 1..10000</a> %e A138248 11*18 - 1 = 197 (prime), 11*18 + 1 = 199 (prime). %t A138248 a=18;Select[Prime[Range[250]],PrimeQ[a*#-1]&&PrimeQ[a*#+1] &] %o A138248 (Magma) [n: n in [0..10000] |IsPrime(n) and IsPrime(18*n-1)and IsPrime(18*n+1)] // _Vincenzo Librandi_, Aug 03 2010 %o A138248 (Python) %o A138248 from sympy import isprime, primerange %o A138248 def ok(p): return isprime(18*p-1) and isprime(18*p+1) %o A138248 def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)] %o A138248 print(aupto(6299)) # _Michael S. Branicky_, Nov 29 2021 %Y A138248 Cf. A001097, A001359, A006512. %K A138248 nonn %O A138248 1,1 %A A138248 _Vladimir Joseph Stephan Orlovsky_, May 05 2008