OFFSET
1,1
COMMENTS
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
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
149 is in the sequence because 149 - 1 = 2*2*37 has 3 prime factors.
MATHEMATICA
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 *)
Select[Prime[Range[120]], PrimeOmega[#-1]<4&] (* Harvey P. Dale, Oct 02 2017 *)
PROG
(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.
(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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 27 2002
EXTENSIONS
Typos in definition corrected by Harvey P. Dale, Oct 02 2017
STATUS
approved