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.

A176486 Numbers n such that semiprime(n)/prime(k)=prime and semiprime(n+1)/prime(k+1)=prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 14, 18, 21, 29, 35, 36, 39, 41, 42, 45, 52, 58, 59, 62, 71, 73, 87, 91, 96, 97, 104, 116, 120, 127, 137, 141, 142, 156, 168, 169, 170, 178, 179, 181, 185, 188, 204, 211, 227, 245, 246, 249, 250, 254, 255, 261, 263, 279, 281, 285, 290, 297, 305
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 18 2010

Keywords

Comments

Indices n such that the (n+1)st semiprime has a prime factor which is the next prime after one of the prime factors of the n-th semiprime. - R. J. Mathar, Apr 20 2010

Examples

			a(1)=1 because semiprime(1)/prime(1)=2 and semiprime(2)/prime(2)=2;
a(2)=2 because semiprime(2)/prime(1)=3 and semiprime(3)/prime(2)=3;
a(3)=3 because semiprime(3)/prime(2)=3 and semiprime(4)/prime(3)=2.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Apr 20 2010: (Start)
    isA001358 := proc(n) numtheory[bigomega](n) = 2 ; end proc:
    A001358 := proc(n) option remember ; if n = 1 then return 4 ; else for a from procname(n-1)+1 do if isA001358(a) then return a; end if; end do; end if; end proc:
    A084126 := proc(n) min(op(numtheory[factorset](A001358(n)))) ; end proc:
    A084127 := proc(n) max(op(numtheory[factorset](A001358(n)))) ; end proc:
    A176486 := proc(n) if n = 1 then 1; else for a from procname(n-1)+1 do spl := A084126(a) ; sph := A084127(a) ; sp2l := A084126(a+1) ; sp2h := A084127(a+1) ; if sp2l = nextprime(spl) or sp2h = nextprime(spl) or sp2l = nextprime(sph) or sp2h = nextprime(sph) then return a; end if; end do: end if; end proc:
    seq(A176486(n),n=1..80) ; (End)
  • Mathematica
    sppQ[{a_,b_}]:=Module[{t=NextPrime[Transpose[FactorInteger[a]][[1]]],c,d}, c=t[[1]];d=If[Length[t]>1,t[[2]],t[[1]]];Divisible[b,c]|| Divisible[ b,d]]; Flatten[ Position[Partition[Select[Range[1500],PrimeOmega[#] == 2&],2,1],?sppQ]] (* _Harvey P. Dale, Mar 16 2015 *)

Extensions

Corrected (59, 137, 142 inserted, 147 removed) and extended by R. J. Mathar, Apr 20 2010