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.

A351170 Consider the primes of the form p(m)=m^2+1 such that p(m+2) is also prime for some m. The sequence lists the sums p(m) + p(m+2).

Original entry on oeis.org

22, 54, 454, 1254, 6054, 31254, 84054, 296454, 432454, 806454, 832054, 1022454, 2398054, 2622054, 2761254, 3100054, 3251254, 3458454, 3781254, 4898454, 5216454, 5611254, 5678454, 7722454, 8446054, 8694454, 8778054, 11568054, 12054054, 12852454, 14204454, 16074454
Offset: 1

Views

Author

Michel Lagneau, Feb 04 2022

Keywords

Examples

			a(3) = 454 because A096012(3) = 14, 14^2+1 = 197, (14+2)^2+1 = 257, and 197 + 257 = 454.
		

Crossrefs

Programs

  • Maple
    nn:=3000:
    for n from 2 by 2 to nn do:
      p1:=n^2+1:p2:=(n+2)^2+1:
       if isprime(p1) and isprime(p2)
        then
        s:=p1+p2:printf(`%d, `,s):
        else
       fi:
    od:
  • Mathematica
    f[n_] := 2*n^2 + 4*n + 6; f /@ Select[Range[3000], And @@ PrimeQ[{#^2 + 1, (# + 2)^2 + 1}] &] (* Amiram Eldar, Feb 04 2022 *)
  • PARI
    lista(nn) = {for (m=1, nn, if (isprime(m^2+1) && isprime(m^2+4*m+5), print1(2*m^2+4*m+6, ", ")););} \\ Michel Marcus, Feb 04 2022

Formula

For n>1, a(n) == 54 (mod 100) (see proof above).
a(n) = 2*(A096012(n)+1)^2+4 = 2*A108814(n)^2+4. - Alois P. Heinz, Feb 04 2022
For n > 1, a(n) mod 400 = 54; a(n) mod 1200 = 54 or 454; a(n) mod 2000 = 54, 454, or 1254; a(n) mod 54, 454, 1254, or 2454. - Jon E. Schoenfield, Feb 04 2022