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.

This page as a plain text file.
%I A281974 #23 Oct 04 2021 08:55:10
%S A281974 1,2,6,10,14,15,21,22,23,26,30,33,34,35,37,38,39,42,46,47,51,53,55,57,
%T A281974 58,62,65,66,67,69,70,74,77,78,79,82,83,85,86,87,89,91,93,94,95,97,
%U A281974 102,105,106,110,111,113,114,115,118,119,122,123
%N A281974 Squarefree numbers excluding twin primes.
%e A281974 30 is a term because: 30 = 2*3*5 is squarefree and is not a member of a twin primes pair.
%t A281974 Select[Range@ 123, SquareFreeQ@ # && ! And[PrimeQ@ #, Total@ Boole@ PrimeQ[# + {-2, 2}] >= 1] &] (* _Michael De Vlieger_, Feb 04 2017 *)
%o A281974 (PARI) {
%o A281974 for(n=1,1000,
%o A281974      mb=moebius(n);
%o A281974      if(mb<>0,
%o A281974          if(isprime(n),
%o A281974              if(!isprime(n-2)&&!isprime(n+2),
%o A281974                  print1(n", ")
%o A281974                ),
%o A281974               ;print1(n", ")
%o A281974            )
%o A281974        )
%o A281974     )
%o A281974 }
%Y A281974 Cf. A005117 (squarefree numbers), A001097 (twin primes), A065421 (Brun's constant).
%K A281974 nonn
%O A281974 1,2
%A A281974 _Dimitris Valianatos_, Feb 03 2017