A179939 Largest semiprime divisor of all composite numbers between semiprime(n) and semiprime(n+1), or 0 if there are none.
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, 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, 87, 0, 91, 46, 93, 95, 65, 0, 0, 51, 0, 69, 106
Offset: 1
Examples
a(1) = 0 because there are no composite numbers between the 1st semiprime 4 and the 2nd semiprime 6. 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. 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.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
b:= proc(n) option remember; local k; if n=1 then 4 else for k from b(n-1)+1 while isprime(k) or add(i[2], i=ifactors(k)[2])<>2 do od; k fi end: a:= proc(n) option remember; local k, l; k, l:= b(n)+1, b(n+1)-1; max(0,seq(seq(`if`(irem(j, b(i))=0, b(i), NULL), i=1..n), j=k..l)) end: seq(a(n), n=1..100); # Alois P. Heinz, Jan 14 2011
-
Mathematica
(* 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 *)
Comments