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.

A260553 Primes p such that p = q^2 + 2*r^2 where q and r are also primes.

Original entry on oeis.org

17, 43, 59, 67, 107, 139, 251, 307, 347, 379, 547, 587, 859, 1699, 1867, 1931, 3371, 3499, 3739, 4507, 5059, 5347, 6907, 6971, 7451, 10091, 10627, 10667, 11467, 12491, 18787, 20411, 21227, 22907, 29947, 32059, 32779, 37547, 38651, 39619, 49307, 49747, 53147
Offset: 1

Views

Author

Colin Barker, Jul 29 2015

Keywords

Examples

			43 is in the sequence because 43 = 5^2 + 2*3^2 and 43, 5 and 3 are all primes.
		

Crossrefs

Main entry for this sequence is A201613.

Programs

  • Mathematica
    Select[#1^2 + 2 #2^2 & @@ # & /@ Tuples[Prime@ Range@ 60, 2], PrimeQ] // Sort (* Michael De Vlieger, Jul 29 2015 *)
  • PARI
    lista(nn)=forprime(p=2, nn, forprime(r=2, sqrtint(p\2), if (issquare(q2 = p-2*r^2) && isprime(sqrtint(q2)), print1(p, ", ")););); \\ Michel Marcus, Jul 29 2015
    
  • PARI
    list(lim)=my(v=List()); lim\=1; forprime(q=2, sqrtint((lim-9)\2), my(t=2*q^2); forprime(p=3, sqrtint(lim-t), my(r=t+p^2); if(isprime(r), listput(v, r)))); Set(v) \\ Charles R Greathouse IV, Oct 09 2024
    
  • Python
    from sympy import prime, isprime
    n = 5000
    A260553_list, plimit = [], prime(n)**2+8
    for i in range(1, n):
        q = 2*prime(i)**2
        for j in range(1, n):
            p = q + prime(j)**2
            if p < plimit and isprime(p):
                A260553_list.append(p)
    A260553_list = sorted(A260553_list) # Chai Wah Wu, Jul 30 2015

A260555 Primes p such that p = q^2 + 6*r^2 where q and r are also primes.

Original entry on oeis.org

73, 79, 103, 193, 199, 223, 271, 313, 439, 463, 751, 823, 991, 1039, 1063, 1087, 1303, 1423, 1543, 1567, 1663, 1759, 1783, 1831, 1873, 1999, 2143, 2287, 2383, 2503, 2833, 3343, 3463, 3583, 3631, 3823, 3847, 3943, 4447, 4513, 4639, 4783, 5023, 5167, 5407
Offset: 1

Views

Author

Colin Barker, Jul 29 2015

Keywords

Comments

Green & Sawhney prove that this sequence is infinite. - Charles R Greathouse IV, Oct 08 2024

Examples

			73 is in the sequence because 73 = 7^2 + 6*2^2 and 73, 7 and 2 are all primes.
		

Crossrefs

Programs

  • Mathematica
    Select[#1^2 + 6 #2^2 & @@ # & /@ Tuples[Prime@ Range@ 60, 2], PrimeQ] // Sort (* Michael De Vlieger, Jul 29 2015 *)
  • PARI
    list(lim)=my(v=List()); lim\=1; forprime(q=2, sqrtint((lim-9)\6), my(t=6*q^2); forprime(p=3, sqrtint(lim-t), my(r=t+p^2); if(isprime(r), listput(v, r)))); Set(v) \\ Charles R Greathouse IV, Oct 08 2024

A260556 Primes p such that p = q^2 + 8*r^2 where q and r are also primes.

Original entry on oeis.org

41, 97, 193, 241, 401, 433, 601, 977, 1033, 1361, 1753, 2281, 2897, 3793, 4241, 4561, 5113, 6737, 6961, 7993, 10273, 11953, 12841, 13457, 17681, 22273, 22481, 26641, 27961, 32833, 37321, 42641, 49801, 49937, 54361, 57193, 58153, 63073, 63377, 76801, 94321
Offset: 1

Views

Author

Colin Barker, Jul 29 2015

Keywords

Examples

			601 is in the sequence because 601 = 23^2 + 8*3^2 and 601, 23 and 3 are all primes.
		

Crossrefs

Programs

  • Mathematica
    Select[#1^2 + 8 #2^2 & @@ # & /@ Tuples[Prime@ Range@ 80, 2], PrimeQ] // Sort (* Michael De Vlieger, Jul 29 2015 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, forprime(r=2, sqrtint(p\8), if (issquare(q2 = p-8*r^2) && isprime(sqrtint(q2)), print1(p, ", "));););} \\ Michel Marcus, Aug 01 2015
  • Python
    from sympy import prime, isprime
    n = 5000
    A260556_list, plimit = [], prime(n)**2+32
    for i in range(1,n):
        q = 8*prime(i)**2
        for j in range(1,n):
            p = q + prime(j)**2
            if p < plimit and isprime(p):
                A260556_list.append(p)
    A260556_list = sorted(A260556_list) # Chai Wah Wu, Jul 30 2015
    

A260557 Primes p such that p = q^2 + 10*r^2 where q and r are also primes.

Original entry on oeis.org

89, 139, 211, 379, 401, 419, 499, 569, 619, 659, 881, 1019, 1051, 1091, 1259, 1409, 1451, 1459, 1499, 1571, 1619, 1699, 1721, 1811, 1889, 1931, 1979, 2099, 2339, 2459, 2531, 2579, 2699, 2939, 3011, 3251, 3299, 3371, 3539, 3571, 3659, 3761, 3779, 3851, 4019
Offset: 1

Views

Author

Colin Barker, Jul 29 2015

Keywords

Comments

Green & Sawhney prove that this sequence is infinite. - Charles R Greathouse IV, Oct 08 2024

Examples

			419 is in the sequence because 419 = 13^2 + 10*5^2 and 419, 13 and 5 are all primes.
		

Crossrefs

Programs

  • Mathematica
    Select[#1^2 + 10 #2^2 & @@ # & /@ Tuples[Prime@ Range@ 36, 2], PrimeQ] // Sort (* Michael De Vlieger, Jul 29 2015 *)
  • PARI
    list(lim)=my(v=List()); lim\=1; forprime(q=2, sqrtint((lim-9)\10), my(t=10*q^2); forprime(p=3, sqrtint(lim-t), my(r=t+p^2); if(isprime(r), listput(v, r)))); Set(v) \\ Charles R Greathouse IV, Oct 08 2024
Showing 1-4 of 4 results.