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.

Showing 1-3 of 3 results.

A290435 Semiprimes of the form pq where p < q and p+q+1 is prime.

Original entry on oeis.org

21, 35, 39, 55, 57, 65, 77, 85, 111, 115, 129, 155, 161, 185, 187, 201, 203, 205, 209, 221, 235, 237, 265, 291, 299, 305, 309, 319, 323, 327, 335, 341, 365, 371, 377, 381, 391, 413, 415, 437, 451, 485, 489, 493, 497, 505, 515, 517, 535, 579, 611, 623, 649, 655
Offset: 1

Views

Author

Chai Wah Wu, Aug 01 2017

Keywords

Comments

Squarefree terms of A290434.
All terms are odd.
A286842(a(n)) = 1 for all n.

Examples

			655 = 5*131 and 5+131+1 is prime, so 655 is a term.
		

Crossrefs

Programs

  • Mathematica
    With[{nn = 54}, Take[#, nn] &@ Union@ Flatten@ Table[Function[p, Map[Times @@ # &@ # &, #] &@ Select[Map[{p, #} &, Prime@ Range[PrimePi@ p - 1]], PrimeQ[Total@ # + 1] &]]@ Prime@ n, {n, nn + 4}]] (* Michael De Vlieger, Aug 01 2017 *)
    With[{nn=60},Take[Times@@@Select[Subsets[Prime[Range[nn]],{2}],PrimeQ[ Total[ #]+ 1]&]//Union,nn]] (* Harvey P. Dale, Aug 02 2017 *)
  • PARI
    isok(n) = (bigomega(n)==2) && (omega(n)==2) && isprime(1+vecsum(factor(n)[,1])); \\ Michel Marcus, Aug 02 2017
  • Python
    from sympy import factorint, isprime
    A290435_list = [n for n in range(2,10**5) if sum(factorint(n).values()) == len(factorint(n)) == 2 and isprime(1+sum(factorint(n).keys()))]
    

A291318 Semiprimes of the form p*q such that p+q-1 is prime.

Original entry on oeis.org

4, 9, 15, 33, 35, 49, 51, 65, 77, 87, 91, 95, 119, 123, 143, 161, 177, 185, 209, 213, 215, 217, 221, 247, 259, 287, 303, 321, 329, 335, 341, 361, 371, 377, 395, 403, 407, 411, 427, 437, 447, 469, 473, 485, 511, 515, 527, 533, 537, 545, 551, 573, 581, 591, 611, 629
Offset: 1

Views

Author

Vincenzo Librandi, Aug 22 2017

Keywords

Comments

Obviously, 4 is the only even term.
The terms divisible by 3 are 3*A001359. - Robert Israel, Aug 22 2017

Examples

			4 = 2*2 and 2+2-1 is prime, so 4 is a term.
185 = 5*37 and 5+37-1 is prime, so 185 is a term.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get terms <= N
    OddPrimes:= select(isprime, [seq(i,i=3..N/3,2)]):
    R:= select(t -> t[1]*t[2]<= N and isprime(t[1]+t[2]-1), [[2,2],seq(seq([OddPrimes[i],OddPrimes[j]],j=1..i),i=1..nops(OddPrimes))]):
    sort(map(t -> t[1]*t[2],R)); # Robert Israel, Aug 22 2017
  • Mathematica
    With[{nn=60}, Take[#, nn]&@Union@Flatten@Table[Function[p, Map[Times@@#&@#&, #]&@Select[Map[{p, #}&, Prime@Range[PrimePi@p]], PrimeQ[Total@# - 1] &]]@Prime@n,{n, nn + 4}]]
    (* Second program: *)
    Select[Range@ 630, And[Length@ # == 2, PrimeQ[First@ # + Last@ # - 1]] &@
    Flatten@Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[#]] &] (* Michael De Vlieger, Aug 22 2017 *)
  • PARI
    list(lim)=my(v=List([4])); forprime(p=3,lim\3, forprime(q=3,min(lim\p,p), if(isprime(p+q-1), listput(v,p*q)))); Set(v) \\ Charles R Greathouse IV, Aug 23 2017

A053343 Semiprimes of the form pq where p < q and p + q - 1 is prime.

Original entry on oeis.org

15, 33, 35, 51, 65, 77, 87, 91, 95, 119, 123, 143, 161, 177, 185, 209, 213, 215, 217, 221, 247, 259, 287, 303, 321, 329, 335, 341, 371, 377, 395, 403, 407, 411, 427, 437, 447, 469, 473, 485, 511, 515, 527, 533, 537, 545, 551, 573, 581, 591, 611, 629, 635
Offset: 1

Views

Author

Labos Elemer, Jan 05 2000

Keywords

Comments

Squarefree terms of A050530 with 2 prime divisors.
All terms are odd. - Muniru A Asiru, Aug 29 2017

Crossrefs

Subsequence of A291318.

Programs

  • GAP
    A053343:=List(Filtered(Filtered(List(Filtered(List([1..10^5],Factors),i->Length(i)=2),Set),j->Length(j)=2),i->IsPrime(Sum(i)-1)),Product); # Muniru A Asiru, Aug 29 2017
  • Mathematica
    With[{nn=70}, Take[Times@@@Select[Subsets[Prime[Range[nn]], {2}], PrimeQ[Total[#] - 1] &]//Union, nn]] (* Vincenzo Librandi, Aug 23 2017 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=5,lim\3, forprime(q=3,min(lim\p,p-2), if(isprime(p+q-1), listput(v,p*q)))); Set(v) \\ Charles R Greathouse IV, Aug 23 2017
    

Formula

n=pq such that n-phi(n) = pq-(p-1)(q-1) = p+q-1 is prime.

Extensions

New name from Vincenzo Librandi Aug 23 2017
Showing 1-3 of 3 results.