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.

A168079 Numbers n such that exactly one of n+-1, n+-2 and n+-3 is prime.

This page as a plain text file.
%I A168079 #20 Mar 09 2022 09:27:43
%S A168079 -1,7,11,13,17,19,24,25,27,29,31,33,35,36,41,43,48,49,51,52,54,55,57,
%T A168079 59,61,63,65,66,71,73,75,77,78,84,85,87,88,90,91,92,94,95,96,101,103,
%U A168079 107,109,114,115,116,124,125,126,132,133,135,137,139,141,142,146,147,149
%N A168079 Numbers n such that exactly one of n+-1, n+-2 and n+-3 is prime.
%H A168079 G. C. Greubel, <a href="/A168079/b168079.txt">Table of n, a(n) for n = 1..1000</a>
%F A168079 a(n) ~ 6n/log n. -_Charles R Greathouse IV_, May 25 2011
%e A168079 a(1)=-1 (-4,-3,-2,0 and 1 are nonprimes, 2 is prime);
%e A168079 a(2)=7 (4,6,8,9 and 10 are nonprimes, 5 is prime);
%e A168079 a(3)=13 (8,9,10,12 and 14 are nonprimes, 11 is prime).
%t A168079 f[n_] := Length[Select[Drop[Range[n - 3, n + 3], {4}], PrimeQ]] == 1; Join[{-1}, Select[Range[0, 200], f]] (* _G. C. Greubel_, Jul 09 2016 *)
%t A168079 Join[{-1},Select[Range[200],Total[Boole[PrimeQ[Drop[Range[#-3,#+3],{4}]]]]==1&]] (* _Harvey P. Dale_, Oct 16 2018 *)
%o A168079 (PARI) is(n)=isprime(n-3) + isprime(n-2) + isprime(n-1) + isprime(n+1) + isprime(n+2) + isprime(n+3) == 1 \\ _Charles R Greathouse IV_, Jun 13 2017
%Y A168079 Cf. A000040, A100317, A141468.
%K A168079 sign
%O A168079 1,2
%A A168079 _Juri-Stepan Gerasimov_, Nov 18 2009
%E A168079 Corrected (11, 57 inserted, 16 replaced by 126) by _R. J. Mathar_, Jun 04 2010