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-10 of 12 results. Next

A096342 Primes of the form p*q + p + q, where p and q are two successive primes.

Original entry on oeis.org

11, 23, 47, 167, 251, 359, 479, 719, 1847, 2111, 2591, 3719, 6719, 7559, 8819, 10607, 12539, 14591, 19319, 27551, 29231, 31319, 51071, 53819, 68111, 97967, 149759, 155219, 172199, 177239, 195359, 199799, 234239, 273527, 305783, 314711, 339863
Offset: 1

Views

Author

Giovanni Teofilatto, Jun 29 2004

Keywords

Comments

a(n) == 3 mod 4.
Primes arising in A126148. - Jonathan Vos Post, Mar 08 2007
Number of primes <10^n: 0, 3, 8, 15, 26, 49, 99, 220, 514, 1228, 2991, 7746, 20218, 54081, ..., . - Robert G. Wilson v

Examples

			a(4)=167 because 11*13 + 11 + 13=167.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[p = Prime[n]Prime[n + 1] + Prime[n] + Prime[n + 1]; If[ PrimeQ[p], AppendTo[a, p]], {n, 110}]; a (* Robert G. Wilson v, Jul 01 2004 *)
    Select[Times@@#+Total[#]&/@Partition[Prime[Range[200]],2,1],PrimeQ] (* Harvey P. Dale, Nov 25 2018 *)
  • PARI
    list(lim)=my(v=List(),p=2,t); forprime(q=3,, t=p*q+p+q; if (t>lim, return(Set(v))); if(isprime(t), listput(v,t)); p=q) \\ Charles R Greathouse IV, Sep 15 2015

Extensions

More terms from Robert G. Wilson v, Jul 02 2004

A128547 Primes p such that p*q-p-q is prime where q=nextprime(p).

Original entry on oeis.org

3, 5, 7, 13, 29, 37, 43, 71, 89, 107, 151, 163, 191, 199, 211, 239, 241, 277, 331, 401, 479, 569, 607, 643, 683, 719, 751, 773, 811, 823, 881, 907, 911, 937, 953, 1087, 1091, 1109, 1117, 1201, 1249, 1289, 1321, 1399, 1439, 1459, 1471, 1597, 1619, 1621, 1657
Offset: 1

Views

Author

Zak Seidov, Mar 10 2007

Keywords

Examples

			3*5-3-5=7 prime, 5*7-5-7=23 prime etc.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[Prime[n], {n, 400}], PrimeQ[#*NextPrime[#] - # - NextPrime[#]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2012 *)
    qnpQ[n_]:=Module[{q=NextPrime[n]},PrimeQ[n*q-n-q]]; Select[Prime[Range[ 500]],qnpQ] (* Harvey P. Dale, Feb 28 2015 *)

A126199 a(n) = prime(n)*prime(n+1) + prime(n) + prime(n+1).

Original entry on oeis.org

11, 23, 47, 95, 167, 251, 359, 479, 719, 959, 1215, 1595, 1847, 2111, 2591, 3239, 3719, 4215, 4895, 5327, 5919, 6719, 7559, 8819, 9995, 10607, 11231, 11879, 12539, 14591, 16895, 18215, 19319, 20999, 22799, 24015, 25911, 27551, 29231, 31319, 32759
Offset: 1

Views

Author

Jonathan Vos Post, Mar 08 2007

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = Prime[n], q = Prime[n + 1]}, p*q + p + q]; Array[f, 42] (* Robert G. Wilson v, Mar 09 2007 *)
    Times@@#+Total[#]&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Nov 01 2017 *)

Formula

a(n) = A180617(n) - 1. - Omar E. Pol, Dec 08 2019

Extensions

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

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

A291339 Primes p such that p^3*q^3 + p^3 + q^3 is prime, where q is the next prime after p.

Original entry on oeis.org

2, 3, 7, 19, 37, 47, 83, 89, 107, 137, 181, 251, 257, 349, 379, 569, 631, 653, 677, 691, 797, 823, 839, 863, 883, 919, 1009, 1021, 1223, 1229, 1361, 1423, 1571, 1609, 1831, 1873, 1907, 1993, 2053, 2113, 2207, 2239, 2293, 2309, 2579, 2833, 3137, 3319, 3593, 3673
Offset: 1

Views

Author

K. D. Bajpai, Aug 22 2017

Keywords

Examples

			a(2) = 3 is prime; 5 is the next prime: 3^3*5^3 + 3^3 + 5^3 = 27*125 + 27 + 125 = 3527 that is a prime.
a(3) = 7 is prime; 11 is the next prime: 7^3*11^3 + 7^3 + 11^3 = 343*1331 + 343 + 1331 = 458207 that is a prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo (5000) | IsPrime(p^3*q^3+p^3+q^3)];
    
  • Maple
    select(p -> andmap(isprime,[p,(p^3*nextprime(p)^3+p^3+nextprime(p)^3)]), [seq(p, p=1..10^4)]);
  • Mathematica
    Prime@Select[Range[1000], PrimeQ[Prime[#]^3*Prime[# + 1]^3 + Prime[#]^3 + Prime[# + 1]^3] &]
    Select[Partition[Prime[Range[600]],2,1],PrimeQ[Times@@(#^3)+Total[#^3]]&][[;;,1]] (* Harvey P. Dale, Apr 28 2025 *)
  • PARI
    is(n) = my(q=nextprime(n+1)); ispseudoprime(n^3*q^3+n^3+q^3)
    forprime(p=1, 3700, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Aug 22 2017
    
  • PARI
    list(lim)=my(v=List(),p=2,p3=8,q3); forprime(q=3,nextprime(lim\1+1), q3=q^3; if(isprime(p3*q3+p3+q3), listput(v,p)); p=q; p3=q3); Vec(v) \\ Charles R Greathouse IV, Aug 23 2017

A291374 Primes p such that p^3*q^3 + p + q is prime, where q is next prime after p.

Original entry on oeis.org

11, 17, 41, 43, 47, 137, 313, 359, 389, 401, 491, 557, 577, 709, 757, 829, 863, 929, 937, 953, 1129, 1163, 1249, 1301, 1307, 1439, 1597, 1627, 1693, 1847, 2087, 2311, 2351, 2437, 2663, 2731, 2741, 3109, 3119, 3217, 3253, 4027, 4219, 4271, 4547, 4637, 5189, 5237
Offset: 1

Views

Author

K. D. Bajpai, Aug 23 2017

Keywords

Examples

			a(1) = 11 is prime; 13 is the next prime: 11^3*13^3 + 11 + 13 = 1331*2197 + 11 + 13 = 2924231 that is a prime.
a(2) = 17 is prime; 19 is the next prime: 17^3*19^3 + 17 + 19 = 4913*6859 + 17 + 19 = 33698303 that is a prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | IsPrime(p^3*q^3 + p + q) where q is NextPrime(p)];
  • Maple
    select(p -> andmap(isprime, [p,(p^3*nextprime(p)^3+p+nextprime(p))]), [seq(p,p=1..10^4)]);
  • Mathematica
    Prime@Select[Range[1000], PrimeQ[Prime[#]^3* Prime[# + 1]^3 + Prime[#] + Prime[# + 1]] &]
  • PARI
    forprime(p=1,5000, q=nextprime(p+1); if(ispseudoprime(p^3*q^3 + p + q), print1(p, ", ")));
    
  • PARI
    list(lim)=my(v=List(),p=2,p3=8,q3); forprime(q=3,nextprime(lim\1+1), q3=q^3; if(isprime(p3*q3+p+q), listput(v,p)); p=q; p3=q3); Vec(v) \\ Charles R Greathouse IV, Aug 23 2017
    

A162358 The larger member q in a pair of successive primes (p,q) such that p*q+p+q is prime.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 29, 43, 47, 53, 61, 83, 89, 97, 103, 113, 127, 139, 167, 173, 179, 227, 233, 263, 313, 389, 397, 419, 421, 443, 449, 487, 523, 557, 563, 587, 599, 617, 647, 653, 691, 787, 809, 811, 821, 857, 967, 991, 1021, 1051, 1103, 1117, 1153, 1181
Offset: 1

Views

Author

Keywords

Examples

			q=3 is the larger member in (2,3) where 2*3+2+3=11 is prime.
q=5 is the larger member in (3,5) where 3*5+3+5=23 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n]*Prime[n+1]+Prime[n]+Prime[n+1];If[PrimeQ[p],AppendTo[lst, Prime[n+1]]],{n,6!}];lst
    Transpose[Select[Partition[Prime[Range[200]],2,1],PrimeQ[ Times@@#+ Total[ #]]&]] [[2]] (* Harvey P. Dale, Jan 19 2016 *)

Formula

a(n) = A151800(A126148(n)).

Extensions

Definition rephrased by R. J. Mathar, Sep 11 2009
Showing 1-10 of 12 results. Next