%I #17 Apr 07 2020 22:28:34
%S 0,4,0,6,0,10,0,6,0,15,0,0,9,0,22,6,25,26,14,0,15,21,34,35,38,39,21,0,
%T 0,22,46,0,0,51,55,57,58,0,15,0,0,62,65,0,69,0,0,9,0,77,39,0,10,82,21,
%U 87,0,91,46,93,95,65,0,0,51,0,69,106
%N Largest semiprime divisor of all composite numbers between semiprime(n) and semiprime(n+1), or 0 if there are none.
%C This is to A052248 as semiprimes (A001358) are to primes (A000040). This defines a mapping f from semiprimes to semiprimes or 0 and f(s) < s holds for all semiprimes s. There is a block of k-1 consecutive 0's corresponding to each block of k consecutive semiprimes (i.e., a block of two consecutive 0's starting at the least of the triples in A115394).
%H Alois P. Heinz, <a href="/A179939/b179939.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = max_{A001358(n) < k < A001358(n+1)} A179312(k).
%e a(1) = 0 because there are no composite numbers between the 1st semiprime 4 and the 2nd semiprime 6.
%e a(2) = 4 because the composite numbers between the 2nd semiprime 6 and the 3rd semiprime 9 are {8} which is divisible by the semiprime 4=2*2.
%e a(10) = 15 because the composite numbers between the 10th semiprime 26 and the 11th semiprime 33 are {27, 28, 30, 32} of which the maximum is found for 30 which is divisible by the semiprime 15=3*5.
%p b:= proc(n) option remember; local k;
%p if n=1 then 4
%p else for k from b(n-1)+1 while
%p isprime(k) or add(i[2], i=ifactors(k)[2])<>2
%p do od; k
%p fi
%p end:
%p a:= proc(n) option remember; local k, l;
%p k, l:= b(n)+1, b(n+1)-1;
%p max(0,seq(seq(`if`(irem(j, b(i))=0, b(i), NULL),
%p i=1..n), j=k..l))
%p end:
%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jan 14 2011
%t (* First run the program for A105999 *) semiPrimeQ[x_] := TrueQ[Plus @@ Last /@ FactorInteger[x] == 2]; spGPF[start_, end_] := Module[{divList, spList}, divList = Union[Flatten[Table[Divisors[n], {n, start + 1, end - 1}]]]; spList = Select[divList, semiPrimeQ]; If[Length[spList] > 0, Return[Max[spList]], Return[0]]]; Table[spGPF[SemiPrime[n], SemiPrime[n + 1]], {n, 50}] (* _Alonso del Arte_, Jan 13 2011 *)
%Y Cf. A001358, A006530, A052248, A115394, A179312.
%K nonn,easy
%O 1,2
%A _Jonathan Vos Post_, Jan 12 2011