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 A157931 #19 Mar 02 2019 02:19:12 %S A157931 4,6,9,10,14,15,21,22,25,26,33,34,38,39,46,49,55,58,62,69,74,82,85,86, %T A157931 91,94,106,111,115,118,122,129,133,134,141,142,146,158,159,166,169, %U A157931 178,183,194,201,202,206,213,214,218,226,235,253,254,259,262,265,274,278 %N A157931 Numbers that are both the sum and the product of two primes. %C A157931 Assuming the Goldbach conjecture, this is A001358 intersect (A005843 union A052147), since an odd number n is the sum of two primes iff n-2 is prime. - _N. J. A. Sloane_, Mar 14 2009 %C A157931 The first few terms of A001358: Semiprimes, not members of A157931 are: 35, 51, 57, 65, 77, 87, 93, 95, ..., . - _Robert G. Wilson v_, Mar 15 2009 %H A157931 Donovan Johnson, <a href="/A157931/b157931.txt">Table of n, a(n) for n = 1..10000</a> (first 1096 terms from Robert G. Wilson v) %F A157931 A014091 INTERSECT A001358. - _R. J. Mathar_, Mar 15 2009 %e A157931 For the numbers up to 100, the solutions are 4 = (2+2) = (2*2); 6 = (3+3) = (2*3); 9 = (2+7) = (3*3); 10 = (3+7) = (2*5); 14 = (3+11) = (2*7); 15 = (2+13) = (3*5); 21 = (2+19) = (3*7); 22 = (3+19) = (2*11); 25 = (2+23) = (5*5); 26 = (3+23) = (2*13); 33 = (2+31) = (3*11); 34 = (3+31) = (2*17); 38 = (7+31) = (2*19); 39 = (2+37) = (3*13); 46 = (3+43) = (2*23); 49 = (2+47) = (7*7); 55 = (2+53) = (5*11); 58 = (5+53) = (2*29); 62 = (3+59) = (2*31); 69 = (2+67) = (3*23); 74 = (3+71) = (2*37); 82 = (3+79) = (2*41); 85 = (2+83) = (5*17); 86 = (3+83) = (2*43); 91 = (2+89) = (7*13); 94 = (5+89) = (2*47). %p A157931 isA014091 := proc(n) for i from 1 do p := ithprime(i) ; if p > n/2 then RETURN(false); fi; if isprime(n-p) then RETURN(true) ; fi; od: end: isA001358 := proc(n) RETURN(numtheory[bigomega](n) = 2) ; end: for n from 4 to 500 do if isA001358(n) and isA014091(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Mar 15 2009 %t A157931 fQ[n_] := Block[{k = 2}, While[k < n, If[ PrimeQ[n - k], Break[]]; k = NextPrime@k]; k + 1 < n]; semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; Select[ Range@ 295, fQ@# && semiPrimeQ@# &] (* _Robert G. Wilson v_, Mar 15 2009 *) %t A157931 Select[Union[Flatten[Table[Prime[i] + Prime[j], {i, 50}, {j, 50}]]], PrimeOmega[#] == 2 &] (* _Alonso del Arte_, Feb 08 2013 *) %t A157931 Union[Select[Total/@Tuples[Prime[Range[60]],2],PrimeOmega[#]==2&]] (* _Harvey P. Dale_, Jul 27 2015 *) %o A157931 (Haskell) %o A157931 a157931 n = a157931_list !! (n-1) %o A157931 a157931_list = filter ((== 1) . a064911) a014091_list %o A157931 -- _Reinhard Zumkeller_, Oct 15 2014 %Y A157931 Cf. A001358, A005843, A052147, A062721. %Y A157931 Cf. A043326 Numbers n such that n is a product of two different primes and n - 2 is prime, A062721 Numbers n such that n is a product of two primes and n - 2 is prime. - _Zak Seidov_, Mar 15 2009 %Y A157931 Cf. A014091, A064911, A100962. %K A157931 easy,nonn,nice %O A157931 1,1 %A A157931 William Weeks (dach(AT)kuci.org), Mar 09 2009 %E A157931 Edited by _N. J. A. Sloane_, Mar 14 2009 %E A157931 Extended by _R. J. Mathar_ and _Robert G. Wilson v_, Mar 15 2009