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.

A120382 Even numbers k such that 3*k-1 and 3*k+1 are not prime.

Original entry on oeis.org

40, 48, 62, 68, 72, 82, 96, 100, 108, 114, 138, 142, 158, 172, 176, 178, 184, 194, 208, 212, 222, 232, 238, 260, 264, 268, 272, 278, 282, 290, 298, 300, 308, 320, 334, 342, 348, 352, 358, 360, 378, 380, 382, 386, 392, 402, 414, 418, 422, 424, 438, 444, 446, 448, 450
Offset: 1

Views

Author

Pierre CAMI, Jun 29 2006

Keywords

Crossrefs

Cf. A060461.

Programs

  • Maple
    remove(k -> isprime(3*k-1) or isprime(3*k+1), [seq(k,k=2..1000,2)]); # Robert Israel, Sep 30 2024
  • Mathematica
    Select[Range[2,450,2],!PrimeQ[3#-1]&&!PrimeQ[3#+1]&] (* James C. McMahon, Sep 30 2024 *)
    Select[2*Range[300],NoneTrue[3#+{1,-1},PrimeQ]&] (* Harvey P. Dale, May 27 2025 *)
  • PARI
    isok(n) = !(n%2) && !isprime(3*n-1) && !isprime(3*n+1); \\ Michel Marcus, Sep 15 2019

Formula

a(n) = 2*A060461(n). - Michel Marcus, Sep 15 2019

Extensions

More terms from Michel Marcus, Sep 15 2019