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.
such that both numbers n + p - 1 and n + q - 1 are prime.
%I A227129 #22 Sep 24 2015 12:13:55 %S A227129 15,51,85,91,133,145,235,249,265,427,451,493,519,559,565,589,591,681, %T A227129 721,871,879,1003,1149,1177,1189,1207,1411,1441,1509,1561,1603,1651, %U A227129 1837,1945,2059,2071,2119,2227,2335,2391,2419,2599,2661,2827,2869,2965,2995 %N A227129 Semiprimes n = p*q, p<q, such that both numbers n + p - 1 and n + q - 1 are prime. %C A227129 Subsequence of A006881. %H A227129 Peter J. C. Moses, <a href="/A227129/b227129.txt">Table of n, a(n) for n = 1..5000</a> %H A227129 Since 591 = 3*197 and numbers 591 + 3 - 1 = 593, 591 + 197 - 1 = 787 are both primes, then 591 is in the sequence. %F A227129 A226770(a(n)-1) = 2. %t A227129 Select[Range[10000],(Last[#2]=={1,1}&&And@@PrimeQ[#1+First[#2]-1]&)[#1,Transpose[FactorInteger[#1]]]&] (* _Peter J. C. Moses_, Jul 03 2013 *) %t A227129 spQ[n_]:=Module[{fi=Transpose[FactorInteger[n]]},fi[[2]]=={1,1}&&AllTrue[ n-1+fi[[1]],PrimeQ]]; Select[Range[3000],spQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 24 2015 *) %Y A227129 Cf. A006881, A226770. %K A227129 nonn %O A227129 1,1 %A A227129 _Vladimir Shevelev_, Jul 02 2013