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.

A128550 a(n) = p, the lesser of twin primes (p, q=p+2) such that p*q + p + q is prime.

Original entry on oeis.org

3, 5, 11, 17, 41, 59, 101, 137, 311, 419, 521, 809, 1019, 1049, 1151, 1229, 1319, 1427, 2111, 2237, 2267, 3119, 3329, 3371, 3539, 4001, 4049, 4091, 4217, 4421, 4721, 5009, 6359, 6569, 6689, 6761, 7487, 7949, 8537, 8627, 9629, 9719, 10007, 10091, 10709
Offset: 1

Views

Author

Zak Seidov, Mar 10 2007

Keywords

Comments

Or, primes p such that p+2 and 2 + 4*p + p^2 are prime.

Examples

			3, 5 and 3*5+3+5=23 are prime; 5, 7 and 5*7+5+7=47 are prime; 11, 13 and 11*13+11+13 are primes.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];r=p+2;If[PrimeQ[r],If[PrimeQ[p*r+p+r],AppendTo[lst,p]]],{n,8!}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 28 2009 *)
    Transpose[Select[Select[Partition[Prime[Range[1500]],2,1],#[[2]]- #[[1]] == 2&],PrimeQ[Times@@#+Total[#]]&]][[1]] (* Harvey P. Dale, Aug 24 2014 *)
  • PARI
    is(n)=isprime(n)&&isprime(n+2)&&isprime(n^2+4*n+2) \\ Charles R Greathouse IV, Jan 29 2013

A126334 Lesser of twin primes (p,q=p+2) such that p*q-p-q and p*q+p+q are primes.

Original entry on oeis.org

3, 5, 17681, 21377, 21587, 33599, 41201, 41411, 70139, 74759, 84629, 109619, 114197, 130619, 155861, 160481, 174467, 219407, 222977, 223439, 230999, 235787, 243431, 284129, 285641, 287279, 300929, 325079, 373211, 386987, 389297, 397151
Offset: 1

Views

Author

Zak Seidov, Mar 10 2007

Keywords

Comments

Or, primes p such that p+2, p^2-2 and 2 + 4*p + p^2 are primes. Intersection of A128550 and A128551.
The number of such p's <= 10^n: 2, 2, 2, 2, 11, 56, 320, 1772, ..., . - Robert G. Wilson v, Mar 11 2007

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{p = Prime[n], q = Prime[n + 1]}, p + 2 == q && PrimeQ[p*q - p - q] && PrimeQ[p*q + p + q]]; lst = {}; Do[ If[ fQ@n == True, AppendTo[lst, Prime@n]; Print@ Prime@n], {n, 39055}] (* Robert G. Wilson v, Mar 11 2007 *)

Extensions

More terms from Robert G. Wilson v, Mar 11 2007

A168536 The lesser of twin primes p such that p*q+a+b+c are also the lesser of twin primes, (p and q are twin primes, p+2=q, a=p-1,b=(p+q)/2,c=q+1).

Original entry on oeis.org

11, 101, 179, 347, 569, 1049, 1229, 1301, 1487, 1667, 3557, 4127, 6089, 6761, 8627, 9041, 10067, 11939, 12251, 14321, 19421, 25847, 28571, 29207, 30011, 30869, 31541, 33329, 33587, 36791, 38459, 39509, 39839, 40427, 43049, 49529, 50591, 50969
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];q=p+2;If[PrimeQ[q],a=p-1;b=p+1;c=q+1;If[PrimeQ[p*q+a+b+c]&&PrimeQ[p*q+a+b+c+2],AppendTo[lst,p]]],{n,8!}];lst
    Select[Partition[Prime[Range[5300]],2,1],#[[2]]-#[[1]]==2&&AllTrue[#[[1]]^2+5#[[1]]+{3,5},PrimeQ]&][[;;,1]] (* Harvey P. Dale, Sep 23 2023 *)
Showing 1-3 of 3 results.