OFFSET
1,1
COMMENTS
Sum of reciprocals ~ 1.495. There are 3528 primes of this kind <= 10^7.
From a(7) = 19 onward, this sequence is identical to A063644(n-6). - Robin Saunders, Sep 22 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1100
EXAMPLE
907 is in the sequence because both 907-1 = 2*3*151 and 907+1 = 2*2*227 have 3 prime factors.
MAPLE
filter:= p -> isprime(p) and numtheory:-bigomega(p-1) <= 3 and numtheory:-bigomega(p+1) <= 3:
select(filter, [2, seq(2*i+1, i=1..10^4)]); # Robert Israel, Nov 11 2014
MATHEMATICA
Select[Prime[Range[2000]], Max[PrimeOmega[#+{1, -1}]]<4&] (* Harvey P. Dale, Oct 07 2015 *)
PROG
(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 both p-1 and p+1 have at most 3 prime factors.
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 27 2002
STATUS
approved