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 16 results. Next

A126148 Primes p such that pq+p+q is prime, where q is the next prime after p.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 19, 23, 41, 43, 47, 59, 79, 83, 89, 101, 109, 113, 137, 163, 167, 173, 223, 229, 257, 311, 383, 389, 409, 419, 439, 443, 479, 521, 547, 557, 577, 593, 613, 643, 647, 683, 773, 797, 809, 811, 853, 953, 983, 1019, 1049, 1097, 1109, 1151, 1171
Offset: 1

Views

Author

J. M. Bergot, Mar 07 2007

Keywords

Examples

			Take p = 13 and q = 17: product is 221 and sum is 30; add them to get 251, a prime. So 13 is a member.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime(ithprime(n)*ithprime(n+1) +ithprime(n) +ithprime(n+1)) then ithprime(n) fi end: seq(a(n), n=1..250); # Emeric Deutsch, Mar 08 2007
  • Mathematica
    Prime@Select[Range[200], PrimeQ[Prime[ # ]Prime[ # + 1] + Prime[ # ] + Prime[ # + 1]] &] (* Ray Chandler, Mar 07 2007 *)
  • PARI
    v=List();p=2;forprime(q=3,1e4, if(isprime(p*q+p+q), listput(v,p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jul 26 2012

Extensions

Extended by Ray Chandler, Emeric Deutsch and Robert G. Wilson v, Mar 07 2007

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
    

A120850 Numbers n such that n is prime and is equal to the sum of the first k primes plus the product of the first k primes, for some k.

Original entry on oeis.org

11, 227, 30071, 24647906487115793512432470614609487044327490547070674282967249490409801198254927547005559122946385681862066942903289, 62797802135946735863734268232365323600796854989079318289826397214991489160762431714712874321823048719463864215556568570809157897364620234601356930764612312239892910549558645813243759770009793795858849126389709
Offset: 1

Views

Author

Carlos Alves, Jul 08 2006

Keywords

Comments

It is in the spirit of A096342 (only for 2 consecutive primes) and of A013918 (all primes but only the sum).
The corresponding values of k are 2, 4, 6, 60, 96, ... - Amiram Eldar, Dec 19 2018

Examples

			11=(2+3)+(2*3) and 11 is prime.
227= (2+3+5+7)+(2*3*5*7) and 227 is prime.
		

Crossrefs

Programs

  • Mathematica
    tb = {};Do[pq = Plus @@ Prime[Range[1, k]] + Times @@ Prime[Range[1, k]]; If[PrimeQ[pq], AppendTo[tb, pq]], {k, 1, 200}]; tb
Showing 1-10 of 16 results. Next