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.

A281974 Squarefree numbers excluding twin primes.

Original entry on oeis.org

1, 2, 6, 10, 14, 15, 21, 22, 23, 26, 30, 33, 34, 35, 37, 38, 39, 42, 46, 47, 51, 53, 55, 57, 58, 62, 65, 66, 67, 69, 70, 74, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 102, 105, 106, 110, 111, 113, 114, 115, 118, 119, 122, 123
Offset: 1

Views

Author

Dimitris Valianatos, Feb 03 2017

Keywords

Examples

			30 is a term because: 30 = 2*3*5 is squarefree and is not a member of a twin primes pair.
		

Crossrefs

Cf. A005117 (squarefree numbers), A001097 (twin primes), A065421 (Brun's constant).

Programs

  • Mathematica
    Select[Range@ 123, SquareFreeQ@ # && ! And[PrimeQ@ #, Total@ Boole@ PrimeQ[# + {-2, 2}] >= 1] &] (* Michael De Vlieger, Feb 04 2017 *)
  • PARI
    {
    for(n=1,1000,
         mb=moebius(n);
         if(mb<>0,
             if(isprime(n),
                 if(!isprime(n-2)&&!isprime(n+2),
                     print1(n", ")
                   ),
                  ;print1(n", ")
               )
           )
        )
    }