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-2 of 2 results.

A045356 Primes congruent to {0, 2, 4} mod 5.

Original entry on oeis.org

2, 5, 7, 17, 19, 29, 37, 47, 59, 67, 79, 89, 97, 107, 109, 127, 137, 139, 149, 157, 167, 179, 197, 199, 227, 229, 239, 257, 269, 277, 307, 317, 337, 347, 349, 359, 367, 379, 389, 397, 409, 419, 439, 449, 457, 467
Offset: 1

Views

Author

Keywords

Comments

A039703(A049084(a(n))) = even; complement of A045429. - Reinhard Zumkeller, Feb 25 2008

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(1000) | p mod 5 in {0, 2, 4} ]; // Vincenzo Librandi, Aug 07 2012
  • Mathematica
    Select[Prime[Range[400]], MemberQ[{0, 2, 4}, Mod[#, 5]] &] (* Vincenzo Librandi, Aug 07 2012 *)
    Select[Prime[Range[100]], EvenQ[Mod[#, 5]] &]  (* Zak Seidov, Aug 31 2012 *)
    Select[Flatten[#+{0,2,4}&/@(5*Range[0,100])],PrimeQ] (* Harvey P. Dale, Sep 14 2019 *)

A192794 Numbers k such that k + 2 and k^2 + 4 are primes.

Original entry on oeis.org

1, 3, 5, 15, 17, 27, 35, 45, 57, 65, 87, 95, 125, 135, 137, 147, 155, 177, 255, 267, 275, 347, 357, 407, 447, 455, 477, 507, 605, 615, 707, 717, 755, 767, 785, 795, 827, 837, 905, 935, 945, 1185, 1235, 1247, 1257, 1275, 1325, 1365, 1457, 1497, 1595, 1695
Offset: 1

Views

Author

Zak Seidov, Dec 19 2012

Keywords

Comments

a(n) is odd for all n. For n > 2, the last digit of a(n) is either 5 or 7 because for n == 1, 3, 9 mod 10, either n+2 == 5 (mod 10) or n^2+4 == 5 (mod 10). Thus if m>1 is a term, then m+2 is in A045378. - Chai Wah Wu, Sep 06 2020

Examples

			1 + 2 = 3 and  1 + 4 = 5 are primes,
3 + 2 = 5 and  9 + 4 = 13 are primes,
5 + 2 = 7 and 25 + 4 = 29 are primes.
		

Crossrefs

Programs

  • Maple
    filter:= n -> isprime(n+2) and isprime(n^2+4):
    select(filter, [seq(i,i=1..2000,2)]); # Robert Israel, Nov 11 2023
  • PARI
    {a=2;forstep(n=1,2000,2,if(isprime(n+a)&&isprime(n^2+a^2), print1(n",")))}
Showing 1-2 of 2 results.