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-2 of 2 results.

A063638 Primes p such that p-2 is a semiprime.

Original entry on oeis.org

11, 17, 23, 37, 41, 53, 59, 67, 71, 79, 89, 97, 113, 131, 157, 163, 179, 211, 223, 239, 251, 269, 293, 307, 311, 331, 337, 367, 373, 379, 383, 397, 409, 419, 439, 449, 487, 491, 499, 503, 521, 547, 593, 599, 613, 631, 673, 683, 691, 701, 709, 719, 733, 739
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2001

Keywords

Comments

Primes of form p*q + 2, where p and q are primes.
11 is the only prime of this form where p=q. For prime p>3, 3 divides p^2+2. - T. D. Noe, Mar 01 2006
The asymptotic growth of this sequence is relevant for A204142. We have a(10^k) = (11, 79, 1571, 27961, 407741, 5647823, ...). - M. F. Hasler, Feb 13 2012

Crossrefs

Programs

  • Haskell
    a063638 n = a063638_list !! (n-1)
    a063638_list = map (+ 2) $ filter ((== 1) . a064911) a040976_list
    -- Reinhard Zumkeller, Feb 22 2012
  • Mathematica
    Take[Select[ # + 2 & /@ Union[Flatten[Outer[Times, Prime[Range[100]], Prime[Range[100]]]]], PrimeQ], 60]
    Select[Prime[Range[200]],PrimeOmega[#-2]==2&] (* Paolo Xausa, Oct 30 2023 *)
  • PARI
    n=0; for (m=2, 10^9, p=prime(m); if (bigomega(p - 2) == 2, write("b063638.txt", n++, " ", p); if (n==1000, break))) \\ Harry J. Smith, Aug 26 2009
    
  • PARI
    forprime(p=3,9999, bigomega(p-2)==2 & print1(p","))
    
  • PARI
    p=2; for(n=1,1e4, until(bigomega(-2+p=nextprime(p+1))==2,); write("b063638.txt", n" "p)) \\ M. F. Hasler, Feb 13 2012
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=3, (lim-2)\3, forprime(q=3, min((lim-2)\p, p), t=p*q+2; if(isprime(t), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Aug 05 2016
    

Formula

a(n) = A241809(n) + 2. - Hugo Pfoertner, Oct 30 2023

A309005 Odd squarefree composite numbers m such that m+2 is prime.

Original entry on oeis.org

15, 21, 35, 39, 51, 57, 65, 69, 77, 87, 95, 105, 111, 129, 155, 161, 165, 177, 195, 209, 221, 231, 237, 249, 255, 267, 291, 305, 309, 329, 335, 345, 357, 365, 371, 377, 381, 395, 399, 407, 417, 429, 437, 447, 455, 465, 485, 489, 497, 501, 519, 545, 555, 561, 591, 597, 611
Offset: 1

Views

Author

David James Sycamore, Jul 05 2019

Keywords

Comments

The squarefree terms of A241809 and A136354 are in this sequence.

Examples

			15 = 3*5 is the smallest squarefree composite number m such that m+2 is prime; 15+2=17.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..611] | IsPrime(n+2) and  not IsPrime(n) and IsSquarefree(n)]; // Vincenzo Librandi, Jul 07 2019
  • Maple
    with(NumberTheory):
    N := 500;
    for n from 2 to N do
    if IsSquareFree(n) and not mod(n, 2) = 0 and not isprime(n) and isprime(n+2) then print(n);
    end if:
      end do:
  • Mathematica
    Select[Range[15, 611, 2], And[CompositeQ@ #, SquareFreeQ@ #, PrimeQ[# + 2]] &] (* Michael De Vlieger, Jul 08 2019 *)
    Select[Prime[Range[2,150]]-2,SquareFreeQ[#]&&CompositeQ[#]&] (* Harvey P. Dale, Dec 03 2022 *)
  • PARI
    isok(n) = isprime(n+2) && (n%2) && (n>1) && !isprime(n) && issquarefree(n); \\ Michel Marcus, Jul 05 2019
    
Showing 1-2 of 2 results.