cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123375 Least k such that the difference between consecutive semiprimes A065516(k) equals n, or 0 if no such k exists.

Original entry on oeis.org

3, 1, 2, 4, 24, 6, 10, 56, 50, 78, 34, 320, 249, 186, 463, 762, 598, 1238, 422, 760, 3760, 3585, 9214, 1765, 4112, 13447, 6675, 4585, 68498, 8112, 10083, 8650, 86203, 49433, 35085, 20641, 458421, 8861, 366314, 157857, 169147, 487115, 277440, 563951, 511757, 920602, 75150
Offset: 1

Views

Author

Alexander Adamchuk, Nov 09 2006

Keywords

Comments

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.

Examples

			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, ...}.
Thus a(1) = 3, a(2) = 1, a(3) = 2, a(4) = 4, a(5) = 24.
		

Crossrefs

Cf. A001358 (semiprimes), A065516 (differences between semiprimes), A131109.

Programs

  • Maple
    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
  • Mathematica
    Table[k=6;While[FreeQ[b=Differences[Select[Range@k++,PrimeOmega[#]==2&]],n]];
    Length@b,{n,11}] (* Giorgos Kalogeropoulos, Apr 02 2021 *)

Extensions

Corrected and extended by R. J. Mathar, Jan 13 2007
More terms from David A. Corneth, Apr 02 2021