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.
%I A167706 #17 May 17 2024 03:27:53 %S A167706 2,4,6,12,18,23,30,37,42,47,53,60,67,72,79,83,89,97,102,108,113,127, %T A167706 131,138,150,157,163,167,173,180,192,198,211,223,228,233,240,251,257, %U A167706 263,270,277,282,293,307,312,317,331,337,348,353,359,367,373,379,383,389 %N A167706 The single or isolated numbers. The union of single (or isolated or non-twin) primes and single (or isolated or average of twin prime pairs) nonprimes. %C A167706 Equals A007510 U A014574. %H A167706 Charles R Greathouse IV, <a href="/A167706/b167706.txt">Table of n, a(n) for n = 1..10000</a> %F A167706 a(n) ~ n log n. - _Charles R Greathouse IV_, Apr 29 2015 %t A167706 With[{nn = 78}, {2}~Join~Union[Transpose[Select[Partition[Prime@ Range@ nn, 3, 1], And[#[[2]] - #[[1]] != 2, #[[3]] - #[[2]] != 2] &]][[2]], Map[Mean, Select[Partition[Prime@ Range@ nn, 2, 1], Differences@ # == {2} &]]]] (* _Michael De Vlieger_, Feb 22 2017, after _Harvey P. Dale_ at A007510 and A014574 *) %o A167706 (PARI) is(n)=if(n%6, (isprime(n) && !isprime(n-2) && !isprime(n+2)) || n==4, isprime(n-1) && isprime(n+1)) \\ _Charles R Greathouse IV_, Apr 29 2015 %o A167706 (PARI) lista(pmax) = {my(p1 = 2, p2 = 3); print1(2, ", "); forprime(p3 = 5, pmax, if(p2 == p1 + 2, print1(p1 + 1, ", ")); if(p2 != p1 + 2 && p2 != p3 - 2, print1(p2, ", ")); p1 = p2; p2 = p3);} \\ _Amiram Eldar_, May 17 2024 %Y A167706 Cf. A007510, A014574. %K A167706 nonn %O A167706 1,1 %A A167706 _Juri-Stepan Gerasimov_, Nov 10 2009, Nov 14 2009 %E A167706 Corrected (97 inserted) by _R. J. Mathar_, Nov 16 2009