login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A172409 Numbers n such that neither n-2 nor n-3 is prime. 0

%I #9 Jun 13 2017 14:59:12

%S 0,1,2,3,11,12,17,18,23,24,27,28,29,30,35,36,37,38,41,42,47,48,51,52,

%T 53,54,57,58,59,60,65,66,67,68,71,72,77,78,79,80,83,84,87,88,89,90,93,

%U 94,95,96,97,98,101,102,107,108,113,114,117,118,119,120,121,122,123,124

%N Numbers n such that neither n-2 nor n-3 is prime.

%F a(n) ~ n. - _Charles R Greathouse IV_, Jun 13 2017

%e a(1)=0 because 0-2=-2 and 0-3=-1 are nonprime.

%t Join[{0,1},Select[Range[150],!PrimeQ[#-2]&&!PrimeQ[#-3]&]] (* 0 and 1 are in the sequence because primes are usually defined to include only positive integers, but because Mathematica treats many negative numbers, including -2 and -3, as primes, it is necessary to include 0 and 1 via "Join". *) (* _Harvey P. Dale_, Aug 06 2012 *)

%o (PARI) is(n)=!isprime(n-2) && !isprime(n-3) \\ _Charles R Greathouse IV_, Jun 13 2017

%K nonn,easy,less

%O 1,3

%A _Juri-Stepan Gerasimov_, Feb 06 2010

%E Corrected by _Charles R Greathouse IV_, Mar 25 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)