cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A062721 Numbers k such that k is a product of two primes and k-2 is prime.

Original entry on oeis.org

4, 9, 15, 21, 25, 33, 39, 49, 55, 69, 85, 91, 111, 115, 129, 133, 141, 159, 169, 183, 201, 213, 235, 253, 259, 265, 295, 309, 319, 339, 355, 361, 381, 391, 403, 411, 445, 451, 469, 481, 489, 493, 501, 505, 511, 543, 559, 565, 573, 579, 589, 633, 649, 655, 679
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 14 2001

Keywords

Comments

This sequence is a subsequence of A107986, which only requires k to be composite. The first term in that sequence which is not in this sequence is 45, a number with three prime factors. - Alonso del Arte, May 03 2014

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 2, 1500 ], Plus @@ Last@Transpose@FactorInteger[ # ] == 2 && PrimeQ[ # - 2 ] & ]
    Select[Range[700], PrimeOmega[#] == 2 && PrimeQ[# - 2]&] (* Harvey P. Dale, Mar 25 2013 *)
  • PARI
    { n=0; for (m=1, 10^9, a=prime(m) + 2; f=factor(a)~; if ((length(f)==1 && f[2, 1]==2) || (length(f)==2 && f[2, 1]==1 && f[2, 2]==1), write("b062721.txt", n++, " ", a); if (n==10000, break)) ) } \\ Harry J. Smith, Aug 09 2009

A157931 Numbers that are both the sum and the product of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 38, 39, 46, 49, 55, 58, 62, 69, 74, 82, 85, 86, 91, 94, 106, 111, 115, 118, 122, 129, 133, 134, 141, 142, 146, 158, 159, 166, 169, 178, 183, 194, 201, 202, 206, 213, 214, 218, 226, 235, 253, 254, 259, 262, 265, 274, 278
Offset: 1

Views

Author

William Weeks (dach(AT)kuci.org), Mar 09 2009

Keywords

Comments

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
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

Examples

			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).
		

Crossrefs

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

Programs

  • Haskell
    a157931 n = a157931_list !! (n-1)
    a157931_list = filter ((== 1) . a064911) a014091_list
    -- Reinhard Zumkeller, Oct 15 2014
  • Maple
    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
  • Mathematica
    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 *)
    Select[Union[Flatten[Table[Prime[i] + Prime[j], {i, 50}, {j, 50}]]], PrimeOmega[#] == 2 &] (* Alonso del Arte, Feb 08 2013 *)
    Union[Select[Total/@Tuples[Prime[Range[60]],2],PrimeOmega[#]==2&]] (* Harvey P. Dale, Jul 27 2015 *)

Formula

A014091 INTERSECT A001358. - R. J. Mathar, Mar 15 2009

Extensions

Edited by N. J. A. Sloane, Mar 14 2009
Extended by R. J. Mathar and Robert G. Wilson v, Mar 15 2009

A158318 Primes p such that 5p-2 is prime.

Original entry on oeis.org

3, 5, 11, 17, 23, 47, 53, 59, 71, 89, 101, 113, 131, 137, 149, 173, 191, 197, 233, 239, 257, 311, 317, 347, 383, 401, 431, 443, 449, 467, 479, 509, 569, 593, 617, 641, 683, 719, 761, 773, 827, 857, 929, 941, 947, 1031, 1061, 1097, 1163, 1181, 1223, 1229
Offset: 1

Views

Author

Zak Seidov, Mar 16 2009

Keywords

Comments

Hence 5p are terms in A157931, A062721 and (except of 25) in A043326.

Crossrefs

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, A157931 Numbers that are both the sum and the product of two primes.

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[5#-2]&] (* Harvey P. Dale, Apr 10 2015 *)
  • PARI
    isok(p) = isprime(p) && isprime(5*p-2);  \\ Michel Marcus, Oct 16 2013
Showing 1-3 of 3 results.