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.

Previous Showing 21-25 of 25 results.

A290767 Primes p such that p^2 +/- p +/- 1 are all nonprimes.

Original entry on oeis.org

23, 37, 43, 73, 107, 109, 113, 137, 157, 179, 211, 223, 227, 229, 239, 251, 257, 271, 277, 283, 311, 313, 317, 347, 353, 367, 389, 439, 443, 467, 503, 509, 521, 523, 547, 557, 563, 577, 587, 593, 601, 631, 653, 661, 719, 733, 757, 797, 811, 821, 823, 829, 853, 859, 877, 883
Offset: 1

Views

Author

Ralf Steiner, Aug 10 2017

Keywords

Crossrefs

Programs

  • Maple
    select(p -> isprime(p) and not ormap(isprime, [p^2+p+1,p^2+p-1,p^2-p+1,p^2-p-1]), [2,seq(i,i=3..1000,2)]); # Robert Israel, Aug 10 2017
  • Mathematica
    Select[Prime[Range[1000]], ! (PrimeQ[#^2 + # + 1] || PrimeQ[#^2 + # - 1] ||PrimeQ[#^2 - # + 1] || PrimeQ[#^2 - # - 1]) &]
    Select[Prime[Range[200]],NoneTrue[{#^2+#+1,#^2+#-1,#^2-#+1,#^2-#-1},PrimeQ]&] (* Harvey P. Dale, Oct 13 2024 *)
  • PARI
    is(n) = my(v=[n^2+n+1, n^2+n-1, n^2-n+1, n^2-n-1]); for(k=1, #v, if(ispseudoprime(v[k]), return(0))); 1
    forprime(p=1, 900, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Aug 10 2017

Formula

Intersection of the complements of A053184, A053182, A065508, and A091567 within the primes A000040.

A352604 Primes p such that p^2+3*p+1 and p^2+p-1 are also prime.

Original entry on oeis.org

2, 3, 5, 19, 53, 59, 163, 263, 349, 373, 419, 449, 499, 1013, 1093, 1259, 1303, 1423, 1489, 1493, 1669, 1759, 2069, 2729, 2879, 3463, 3943, 4159, 4243, 4283, 4493, 4603, 4793, 4969, 5113, 5303, 5563, 6323, 6599, 6803, 6829, 6883, 7369, 7523, 7529, 7963, 8039, 8713, 8969, 9043, 9173, 9293, 9623
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 22 2022

Keywords

Comments

Primes p such that (p-1)*p+(p-1)+p and p*(p+1)+p+(p+1) are also prime.

Examples

			a(3) = 5 is a term because 5, 5^2+3*5+1 = 41 and 5^2+5-1 = 29 are all prime.
		

Crossrefs

Intersection of A053184 and A153590.

Programs

  • Maple
    select(t -> isprime(t^2+3*t+1) and isprime(t^2+t-1), [seq(ithprime(i),i=1..10000)]);
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen():
        p = 2
        while True:
            if isprime(p**2 + 3*p + 1) and isprime(p**2 + p - 1):
                yield p
            p = nextprime(p)
    print(list(islice(agen(), 53))) # Michael S. Branicky, Mar 22 2022

A154941 Sophie Germain primes in A154939.

Original entry on oeis.org

3, 5, 11, 131, 419, 1409, 2069, 3449, 3761, 3911, 6899, 7079, 7151, 9539, 9791, 10529, 10691, 11321, 11831, 14741, 15269, 17291, 22079, 27281, 27809, 30449, 34439, 45131, 48479, 52289, 54251, 64439, 70901, 75389, 78839, 85691, 101411, 102911
Offset: 1

Views

Author

Keywords

Comments

2*3+1=7, 5*2+1=11, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-1)*(p+1)-p]&&PrimeQ[(p-1)*(p+1)+p],If[PrimeQ[p*2+1],AppendTo[lst,p]]],{n,8!}];lst
    Select[Prime[Range[10000]],AllTrue[{2#+1,(#-1)(#+1)+#,(#-1)(#+1)-#},PrimeQ]&] (* Harvey P. Dale, Sep 21 2023 *)

A154944 Primes p such that (p-1)*p*(p+1)-p+2 and (p-1)*p*(p+1)+p-2 are primes.

Original entry on oeis.org

19, 37, 67, 151, 367, 859, 1471, 2791, 2971, 3061, 4357, 4447, 4507, 6367, 7159, 7237, 7591, 8311, 8647, 11617, 12211, 12601, 13249, 14947, 15271, 15661, 16699, 18097, 19777, 20149, 20347, 20947, 21019, 22741, 23311, 23857, 24019, 25867, 26701
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-1)*p*(p+1)-p+2]&&PrimeQ[(p-1)*p*(p+1)+p-2],AppendTo[lst,p]],{n,8!}];lst

A155010 Primes p such that (p-a)*(p+a)-+a*p and (p-b)*(p+b)-+b*p are primes, a=2,b=3.

Original entry on oeis.org

7, 37, 587, 28703, 35677, 36857, 99367, 326707, 361687, 578167, 613573, 619007, 656407, 688783, 702203, 713467, 874823, 922027, 940573, 1045763, 1057907, 1244687, 1371157, 1419697, 1555187, 1665767, 1687187, 1687327, 1799453
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-2)*(p+2)-2*p]&&PrimeQ[(p-2)*(p+2)+2*p]&&PrimeQ[(p-3)*(p+3)-3*p]&&PrimeQ[(p-3)*(p+3)+3*p],AppendTo[lst,p]],{n,9!}];lst
    Select[Prime[Range[200000]],AllTrue[Flatten[{(#-2)(#+2)+{2#,-2#},(#-3)(#+3)+ {3#,-3#}}],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 26 2015 *)
Previous Showing 21-25 of 25 results.