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 11-13 of 13 results.

A163182 Primes p such that neither 4p+3 nor 4p-3 are prime.

Original entry on oeis.org

3, 13, 43, 53, 73, 83, 97, 127, 137, 139, 163, 167, 173, 197, 199, 211, 223, 251, 269, 277, 281, 293, 311, 317, 337, 347, 379, 383, 397, 409, 419, 421, 433, 443, 449, 463, 491, 503, 547, 557, 563, 593, 601, 607, 613, 617, 641, 643, 727, 733, 757, 787, 809
Offset: 1

Views

Author

Keywords

Comments

Primes neither in A023213 nor in A157978.

Examples

			For p=3, 4*3+3=15 (not prime) and 4*3-3=9 (not prime), so the prime p=3 is in the sequence.
For p=7, 4*7+3=31 (prime), so the prime p=7 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !PrimeQ[2*p+(p-1)+(p-2)]&&!PrimeQ[2*p+(p+1)+(p+2)], AppendTo[lst,p]],{n,3*5!}];lst
    Select[Prime[Range[150]],NoneTrue[4#+{3,-3},PrimeQ]&] (* Harvey P. Dale, Aug 01 2022 *)
  • PARI
    isok(p) = isprime(p) && !isprime(4*p+3) && !isprime(4*p-3); \\ Michel Marcus, Oct 12 2018

Extensions

Edited by R. J. Mathar, Jul 25 2009, Jul 27 2009

A238699 Primes p such that 2p + 3 and 4p + 3 are both prime.

Original entry on oeis.org

2, 5, 7, 17, 19, 47, 67, 89, 157, 227, 229, 307, 349, 439, 467, 487, 509, 599, 647, 797, 929, 1039, 1187, 1217, 1237, 1259, 1307, 1427, 1447, 1567, 1789, 2027, 2309, 2467, 2539, 2707, 2789, 2819, 3167, 3457, 3499, 3659, 3877, 3919, 4057, 4079, 4157, 4289, 4297
Offset: 1

Views

Author

Ilya Lopatin, Mar 03 2014, following a suggestion by Juri-Stepan Gerasimov

Keywords

Comments

Intersection of A023204 and A023213.
Primes in A115334.

Examples

			89 is in the sequence because 2*89 + 3 = 181 and 4*89 + 3 = 359 are both prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(4500) | IsPrime(2*p+3) and IsPrime(4*p+3)]; // Bruno Berselli, Mar 03 2014
    
  • Mathematica
    Select[Prime[Range[600]],AllTrue[{2#+3,4#+3},PrimeQ]&] (* Harvey P. Dale, Dec 24 2023 *)
  • PARI
    select(p->isprime(2*p+3)&&isprime(4*p+3), primes(1000)) \\ Charles R Greathouse IV, Mar 06 2014

Extensions

Edited by Bruno Berselli, Mar 03 2014

A372113 Numbers k for which (k-1)/2 and 2*k+1 are both primes.

Original entry on oeis.org

5, 11, 15, 23, 35, 39, 63, 75, 83, 95, 119, 135, 179, 215, 219, 299, 303, 315, 359, 363, 455, 459, 483, 515, 543, 615, 663, 699, 719, 735, 779, 803, 879, 915, 923, 935, 975, 999, 1019, 1043, 1143, 1155, 1175, 1199, 1295, 1323, 1355, 1383, 1439, 1539, 1595, 1659, 1679, 1755, 1763, 1815, 1859, 1883
Offset: 1

Views

Author

Alexandre Herrera, Apr 19 2024

Keywords

Comments

Intersection of A072055 and A104635.

Examples

			5 is a term because (5-1)/2 = 2 is prime and 2*5+1 = 11 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 2000, 2], AllTrue[{(# - 1)/2, 2 # + 1}, PrimeQ] &] (* Michael De Vlieger, Apr 19 2024 *)
  • Python
    from sympy import isprime
    def a(n): return n%2 == 1 and isprime((n-1)>>1) and isprime(2*n+1)
    print([n for n in range(2, 1900) if a(n)])

Formula

a(n) = 2*A023213(n) + 1.
a(n) = (A126330(n)-1)/2.
Previous Showing 11-13 of 13 results.