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.

A325437 Final digit of primes of the form k^2 + 1.

Original entry on oeis.org

2, 5, 7, 7, 1, 7, 7, 1, 7, 7, 7, 1, 7, 7, 7, 7, 7, 1, 7, 1, 7, 1, 7, 7, 1, 7, 7, 1, 7, 1, 1, 7, 1, 7, 7, 7, 1, 7, 1, 7, 1, 1, 7, 1, 7, 1, 1, 7, 1, 7, 7, 7, 1, 1, 7, 7, 7, 1, 7, 1, 1, 7, 1, 7, 7, 7, 1, 7, 1, 7, 7, 7, 7, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 7, 1, 7
Offset: 1

Views

Author

Martin Renner, Apr 27 2019

Keywords

Comments

This sequence is presumably infinite. See 1st comment of A002496.
For k > 2, i.e., primes > 5 the final digit is always 1 or 7. Proof: Let k = 2*m - 1 odd. Then k^2 + 1 is divisible by 2, hence prime only for m = 1. Let k = 2*m even. Then k^2 + 1 = 4*m^2 + 1. The final digit of multiples of four is 4, 8, 2, 6, 0, 4, 8, 2, 6, 0, ... and of squares 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, ... (cf. A008959), hence the last digit of the product 4*m^2 is 4, 6, 6, 4, 0, ... or of the sum 4*m^2 + 1 is 5, 7, 7, 5, 1, ... (cf. A053755) and therefore for primes > 5 the final digit is 1 or 7.
Accordingly, for large k approximately one-third of the primes of the form k^2 + 1 end in 1, two-thirds end in 7.

Crossrefs

Programs

  • Maple
    seq(k mod 10,k=select(isprime,[2,seq(4*i^2+1,i=1..10000)]));
  • Mathematica
    Mod[#,10]&/@Select[Range[1000]^2+1,PrimeQ] (* Harvey P. Dale, Jul 05 2023 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (issquare(p-1), print1(p % 10, ", ")););} \\ Michel Marcus, May 07 2019

Formula

a(n) = A002496(n) mod 10.