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.

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