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-4 of 4 results.

A128548 Primes p such that p*q-p-q and p*q+p+q are prime where q=nextprime(p).

Original entry on oeis.org

3, 5, 13, 43, 89, 163, 479, 643, 683, 773, 811, 953, 1109, 1399, 1471, 2213, 2741, 3253, 4583, 5153, 5923, 6427, 7649, 9059, 10151, 10531, 12301, 12373, 13553, 13903, 13921, 14723, 14869, 14929, 16183, 17123, 17681, 21149, 21377, 21569, 21587
Offset: 1

Views

Author

Zak Seidov, Mar 10 2007

Keywords

Comments

Intersection of A126148 and A128546.

Examples

			3*5-3-5=7 and 3*5+3+5=23 are prime, 5*7-5-23=7 and 5*7+5+7=47 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Prime[Range[2500]],2,1],AllTrue[Times@@#+{Total[#],-Total[#]},PrimeQ]&][[;;,1]] (* Harvey P. Dale, Aug 30 2025 *)
  • PARI
    isok(p) = isprime(p) && (q = nextprime(p+1)) && isprime(p*q-p-q) && isprime(p*q+p+q); \\ Michel Marcus, Oct 11 2013

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

A128551 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, 29, 71, 107, 191, 239, 569, 881, 1091, 1289, 1619, 1721, 1931, 1997, 2081, 2087, 2129, 2309, 2381, 2549, 2591, 2729, 3299, 3359, 3527, 3851, 4229, 4241, 4271, 4649, 5279, 5501, 5651, 6299, 7127, 7349, 7547, 7589, 7757, 8219, 8969, 9437, 10037
Offset: 1

Views

Author

Zak Seidov, Mar 10 2007

Keywords

Comments

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

Examples

			3, 5 and 3*5-3-5=7 are prime; 5, 7 and 5*7-5-7=23 are prime; 29, 31 and 29*31-29-31=839 are primes.
		

Crossrefs

Programs

  • Mathematica
    Clear[lst,f1,f2,n,p]; f1[n_]:=PrimeQ[n+2]; f2[n_]:=PrimeQ[n*(n+2)-((n+2)+n)]; lst={};Do[p=Prime[n];If[f1[p]&&f2[p],AppendTo[lst,p]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 19 2009 *)
    tpQ[{a_,b_}]:=b-a==2&&PrimeQ[a*b-a-b]; Transpose[Select[Partition[ Prime[ Range[ 1300]],2,1],tpQ]][[1]] (* Harvey P. Dale, May 22 2014 *)

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
Showing 1-4 of 4 results.