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.

A382669 Even numbers m such that both p = m^2 + 1 and q = (p^2 + 1)/2 are primes.

Original entry on oeis.org

2, 10, 150, 160, 230, 270, 400, 890, 910, 920, 1060, 1430, 1550, 1970, 2700, 2960, 3280, 3290, 3520, 3660, 4140, 4330, 4510, 4700, 4780, 4850, 4920, 5180, 5360, 5500, 5560, 5620, 5880, 5960, 6220, 6460, 6980, 7160, 7190, 7520, 7550, 7820, 9630, 9760, 9900
Offset: 1

Views

Author

Ya-Ping Lu, Apr 24 2025

Keywords

Comments

Except 2, all terms are divisible by 10, and p-1 and q-1 are divisible by 100.
Numbers m such that p = m^2+1 and p + m^4/2 are both prime. - Chai Wah Wu, May 01 2025

Examples

			10 is a term because both 10^2 + 1 = 101 and (101^2 + 1)/2 = 5101 are primes.
		

Crossrefs

Programs

  • Maple
    filter:= proc(m) local p;
      p:= m^2 + 1;
      isprime(p) and isprime((p^2+1)/2)
    end proc:
    select(filter, [2,seq(i,i=10..10000,10)]); # Robert Israel, May 02 2025
  • Mathematica
    Select[2*Range[5000], PrimeQ[#^2 + 1] && PrimeQ[#^4/2 + #^2 + 1] &] (* Amiram Eldar, Apr 24 2025 *)
  • Python
    from sympy import isprime
    for n in range(2, 10000, 2): x = n*n + 1; ct = 0; print(n, end = ', ') if isprime(x) and isprime((x*x + 1)//2) else 0
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A382669_gen(): # generator of terms
        yield 2
        yield from filter(lambda m: isprime(p:=m**2+1) and isprime(p+(m**4>>1)),(10*k for k in count(1)))
    A382669_list = list(islice(A382669_gen(),45)) # Chai Wah Wu, May 02 2025