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.

A174392 Neither n-1 nor n+1 is prime.

This page as a plain text file.
%I A174392 #18 Sep 11 2024 11:43:03
%S A174392 0,5,7,9,11,13,15,17,19,21,23,25,26,27,29,31,33,34,35,37,39,41,43,45,
%T A174392 47,49,50,51,53,55,56,57,59,61,63,64,65,67,69,71,73,75,76,77,79,81,83,
%U A174392 85,86,87,89,91,92,93,94,95,97,99,101,103,105,107,109,111,113,115,116,117,118
%N A174392 Neither n-1 nor n+1 is prime.
%C A174392 Union of {0} and A099047. [_R. J. Mathar_, Aug 09 2010]
%e A174392 a(1)=0 because 0-1=-1 and 0+1=1 are nonprime; a(2)=5 because 5-1=4 and 5+1=6 are nonprime.
%t A174392 Select[Range[0,150],!PrimeQ[#-1]&&!PrimeQ[#+1]&] (* _Harvey P. Dale_, Aug 15 2012 *)
%t A174392 Join[{0},Mean/@SequencePosition[Table[If[PrimeQ[n],0,1],{n,200}],{1,x_,1}]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Nov 17 2019 *)
%Y A174392 Cf. A099047.
%K A174392 nonn,easy
%O A174392 1,2
%A A174392 _Juri-Stepan Gerasimov_, Mar 18 2010
%E A174392 Corrected by _Charles R Greathouse IV_, Mar 18 2010
%E A174392 Incorrect comment removed by _Lambert Meertens_, Sep 11 2024