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.

A079151 Primes p such that p-1 has at most 3 prime factors, counted with multiplicity; i.e., primes p such that bigomega(p-1) = A001222(p-1) <= 3.

This page as a plain text file.
%I A079151 #21 Sep 30 2021 12:29:05
%S A079151 2,3,5,7,11,13,19,23,29,31,43,47,53,59,67,71,79,83,103,107,131,139,
%T A079151 149,167,173,179,191,223,227,239,263,269,283,293,311,317,347,359,367,
%U A079151 383,389,419,431,439,443,467,479,499,503,509,557,563,587,599,607,619,643
%N A079151 Primes p such that p-1 has at most 3 prime factors, counted with multiplicity; i.e., primes p such that bigomega(p-1) = A001222(p-1) <= 3.
%C A079151 Can it be proved that this is a subsequence of A301590, except for a(5) = 13? (Checked up to A301591(10^4) = 427421.) - _M. F. Hasler_, Aug 14 2021
%H A079151 Charles R Greathouse IV, <a href="/A079151/b079151.txt">Table of n, a(n) for n = 1..10000</a>
%e A079151 149 is in the sequence because 149 - 1 = 2*2*37 has 3 prime factors.
%t A079151 s[n_] := Reap[sr = 0; ct = 0; For[x = 2, x <= n, x = NextPrime[x], If[PrimeOmega[x - 1] < 4, Sow[x]; sr += 1.0/x; ct += 1]]][[2, 1]]; s[700] (* _Jean-François Alcover_, Jun 08 2013, translated and adapted from Pari *)
%t A079151 Select[Prime[Range[120]],PrimeOmega[#-1]<4&] (* _Harvey P. Dale_, Oct 02 2017 *)
%o A079151 (PARI) s(n)=sr=0; ct=0; forprime(x=2,n, if(bigomega(x-1) < 4, print1(x" "); sr+=1.0/x; ct+=1; ); ); print(); print(ct" "sr); \\ Lists primes p<=n such that p-1 has at most 3 prime factors.
%o A079151 (PARI) list(lim)=my(v=List([2,3]),t); forprime(p=2,(lim-1)\2, if(isprime(t=2*p+1), listput(v,t))); forprime(p=2,(lim-1)\4, forprime(q=2,min(p,(lim-1)\2\p), if(isprime(t=2*p*q+1), listput(v,t)))); Set(v) \\ _Charles R Greathouse IV_, Mar 06 2017
%Y A079151 Cf. A079148, A079150, A079152, A079153.
%K A079151 easy,nonn
%O A079151 1,1
%A A079151 _Cino Hilliard_, Dec 27 2002
%E A079151 Typos in definition corrected by _Harvey P. Dale_, Oct 02 2017