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!)
A099047 Numbers n such that n-1 and n+1 are both composite. 5
5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 26, 27, 29, 31, 33, 34, 35, 37, 39, 41, 43, 45, 47, 49, 50, 51, 53, 55, 56, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 76, 77, 79, 81, 83, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 116, 117 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[6! ], !PrimeQ[ #-1]&&!PrimeQ[ #+1]&] (* Vladimir Joseph Stephan Orlovsky, Apr 26 2010 *)
Select[Range[120], AllTrue[#+{1, -1}, CompositeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2018 *)
Mean/@SequencePosition[Table[If[CompositeQ[n], 1, 0], {n, 120}], {1, _, 1}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 23 2019 *)
PROG
(PARI) for(n=5, 200, if(!isprime(n-1)&&!isprime(n+1), print1(n, ", ")))
(Haskell)
a099047 n = a099047_list !! (n-1)
a099047_list = [m | m <- [1..],
a010051' (m - 1) == 0 && a010051' (m + 1) == 0]
-- Reinhard Zumkeller, Aug 04 2015
CROSSREFS
Sequence in context: A097985 A362570 A342378 * A174392 A084926 A333038
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Nov 13 2004
STATUS
approved

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 March 28 16:34 EDT 2024. Contains 371254 sequences. (Running on oeis4.)