%I #8 Dec 18 2014 02:05:24
%S 1,1,1,2,3,2,1,3,4,2,3,4,3,5,2,2,4,3,1,3,2,4,3,2,5,4,2,3,4,2,1,5,6,2,
%T 3,2,1,3,6,4,4,4,6,3,4,5,3,6,4,6,2,4,3,4,2,5,8,5,6,3,3,4,4,2,3,2,3,7,
%U 6,5,3,4,4,6,2,2,5,7,1,5,5,4,6,2,4,6,5,5,4,2,2,5,3,3,3,4,1,3,5,7,5,4,3,3,5,2,4,5,7,4,7,4,3,7,4,3,2,3,4,2
%N a(n) = smallest positive integer k such that both A083221(k, n) and A083221(k+1, n) have at most two prime factors (are primes or semiprimes).
%H Antti Karttunen, <a href="/A251718/b251718.txt">Table of n, a(n) for n = 1..509</a>
%F For all n, A251717(n) <= a(n) <= A251719(n).
%o (Scheme) (define (A251718 n) (let loop ((i 1)) (if (and (<= (A001222 (A083221bi i n)) 2) (<= (A001222 (A083221bi (+ i 1) n)) 2)) i (loop (+ i 1))))) ;; Code for A083221bi given in A083221.
%Y Variant: A251717.
%Y A005382 gives the positions of 1 after the initial a(1)=1.
%Y Cf. A001222, A083221 (A083140), A251719.
%K nonn
%O 1,4
%A _Antti Karttunen_, Dec 15 2014