login
Numbers that are neither primes nor three times primes.
1

%I #14 May 13 2020 17:10:48

%S 1,4,8,10,12,14,16,18,20,22,24,25,26,27,28,30,32,34,35,36,38,40,42,44,

%T 45,46,48,49,50,52,54,55,56,58,60,62,63,64,65,66,68,70,72,74,75,76,77,

%U 78,80,81,82,84,85,86,88,90,91,92,94,95,96

%N Numbers that are neither primes nor three times primes.

%C Arises in studying A254077.

%H N. J. A. Sloane, <a href="/A257586/b257586.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) ~ n*(1+(4/3)/log(n)).

%p s1:=[]: for n from 1 to 1000 do

%p if isprime(n) or ( (n mod 3) = 0 and isprime(n/3)) then ; else s1:=[op(s1),n]; fi; od: s1;

%t Select[Range@96,Nor[PrimeQ[#],PrimeQ[#/3]]&] (* _Ivan N. Ianakiev_, May 08 2015 *)

%t Module[{nn=100,pr,pr3},pr=Prime[Range[PrimePi[nn]]];pr3=3Prime[Range[ PrimePi[ nn/3]]];Complement[Range[nn],pr,pr3]] (* _Harvey P. Dale_, May 13 2020 *)

%Y Cf. A254077.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, May 07 2015