%I #28 Apr 10 2021 22:44:56
%S 3,1,2,4,24,6,10,56,50,78,34,320,249,186,463,762,598,1238,422,760,
%T 3760,3585,9214,1765,4112,13447,6675,4585,68498,8112,10083,8650,86203,
%U 49433,35085,20641,458421,8861,366314,157857,169147,487115,277440,563951,511757,920602,75150
%N Least k such that the difference between consecutive semiprimes A065516(k) equals n, or 0 if no such k exists.
%C a(n) equals least k such that A065516(k) = n, or 0 if no such k exists. Conjecture: a(n)>0 exists for all n.
%H David A. Corneth, <a href="/A123375/b123375.txt">Table of n, a(n) for n = 1..82</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Semiprime.html">Semiprime</a>
%e A065516(n) begins {2, 3, 1, 4, 1, 6, 1, 3, 1, 7, 1, 1, 3, 1, 7, 3, 2, 4, 2, 1, 4, 3, 4, 5, ...}.
%e Thus a(1) = 3, a(2) = 1, a(3) = 2, a(4) = 4, a(5) = 24.
%p nextSprime := proc(n) local res ; res := n+1 ; while numtheory[bigomega](res) <> 2 do res := res+1 ; od ; RETURN(res) ; end ; nmax := 500 ; kmax := 500000 ; a := array(1..nmax) ; for i from 1 to nmax do a[i] := 0 ; od : sp1 := 4 : sp2 := nextSprime(sp1) : n := sp2-sp1 : a[n] := 1 : for k from 2 to kmax do sp1 := sp2 ; sp2 := nextSprime(sp1) ; n := sp2-sp1 ; if a[n] = 0 then a[n] := k ; fi ; od : for i from 1 to nmax do if a[i] = 0 then break ; else printf("%d,",a[i]) ; fi ; od : # _R. J. Mathar_, Jan 13 2007
%t Table[k=6;While[FreeQ[b=Differences[Select[Range@k++,PrimeOmega[#]==2&]],n]];
%t Length@b,{n,11}] (* _Giorgos Kalogeropoulos_, Apr 02 2021 *)
%Y Cf. A001358 (semiprimes), A065516 (differences between semiprimes), A131109.
%K nonn,hard
%O 1,1
%A _Alexander Adamchuk_, Nov 09 2006
%E Corrected and extended by _R. J. Mathar_, Jan 13 2007
%E More terms from _David A. Corneth_, Apr 02 2021
|