OFFSET
1,1
COMMENTS
Each term is the beginning of a run of three 2-almost primes (semiprimes). No runs exist of length greater than three. For the same reason, each term must be odd: If k were even, then so would be k+2. In fact, one of k or k+2 would be divisible by 4, so must indeed be 4 to have only two prime factors. However, neither 2,3,4 nor 4,5,6 is such a run. - Rick L. Shepherd, May 27 2002
The squarefree terms are listed in A039833. - Jianing Song, Nov 30 2021
LINKS
D. W. Wilson, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
121 is in the sequence because 121 = 11^2, 122 = 2*61 and 123 = 3*41, each of which is the product of two primes.
MATHEMATICA
f[n_] := Plus @@ Transpose[ FactorInteger[n]] [[2]]; Select[Range[10^4], f[ # ] == f[ # + 1] == f[ # + 2] == 2 & ]
Flatten[Position[Partition[PrimeOmega[Range[5000]], 3, 1], {2, 2, 2}]] (* Harvey P. Dale, Feb 15 2015 *)
SequencePosition[PrimeOmega[Range[5000]], {2, 2, 2}][[;; , 1]] (* Harvey P. Dale, Mar 03 2024 *)
PROG
(PARI) forstep(n=1, 5000, 2, if(bigomega(n)==2 && bigomega(n+1)==2 && bigomega(n+2)==2, print1(n, ", ")))
(PARI) is(n)=n%4==1 && isprime((n+1)/2) && bigomega(n)==2 && bigomega(n+2)==2 \\ Charles R Greathouse IV, Sep 08 2015
(PARI) list(lim)=my(v=List(), t); forprime(p=2, (lim+1)\2, if(bigomega(t=2*p-1)==2 && bigomega(t+2)==2, listput(v, t))); Vec(v) \\ Charles R Greathouse IV, Sep 08 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Sharon Sela (sharonsela(AT)hotmail.com), May 04 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 04 2002
STATUS
approved