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 A079152 #18 Sep 08 2022 08:45:08 %S A079152 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,97, %T A079152 101,103,107,109,113,131,137,139,149,157,163,167,173,179,181,191,193, %U A079152 211,223,227,229,239,241,257,263,269,277,281,283,293,311,313,317,331 %N A079152 Primes p such that either p-1 or p+1 has at most 3 prime factors, counted with multiplicity; i.e., primes p such that either bigomega(p-1) <= 3 or bigomega(p+1) <= 3, where bigomega(n) = A001222(n). %C A079152 Up to 83, this is the sequence of prime numbers A000040. 89 is not in the sequence because both 89-1 = 88 = 2*2*2*11 and 89+1 = 90 = 2*3*3*5 have 4 prime factors. %H A079152 Daniel Starodubtsev, <a href="/A079152/b079152.txt">Table of n, a(n) for n = 1..10000</a> %e A079152 97 is in the sequence because 97+1 = 98 = 2*7*7 has 3 prime factors. %t A079152 Select[Prime /@ Range[70], PrimeOmega[# - 1] <= 3 || PrimeOmega[# + 1] <= 3 & ] (* _Jean-François Alcover_, Jul 02 2013 *) %o A079152 (PARI) s(n) = {sr=0; ct=0; forprime(x=2,n, if(bigomega(x-1) < 4 || bigomega(x+1) < 4, print1(x, ", "); sr+=1.0/x; ct+=1; ); ); print(); print(ct" "sr); } \\ Lists primes p<=n such that either p-1 or p+1 has at most 3 prime factors. %o A079152 (Magma) bg:=func<n|&+[p[2]: p in Factorization(n)]>; [2] cat [p: p in PrimesInInterval(3,340)| bg(p-1) le 3 or bg(p+1) le 3]; // _Marius A. Burtea_, Jan 16 2020 %Y A079152 Union of A079150 and A079151. Cf. A079149, A079153. %K A079152 nonn %O A079152 1,1 %A A079152 _Cino Hilliard_, Dec 27 2002