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.

A236056 Numbers k such that k^2 +- k +- 1 is prime for all four possibilities.

This page as a plain text file.
%I A236056 #21 Jul 31 2022 17:10:41
%S A236056 3,6,21,456,1365,2205,2451,2730,8541,18486,32199,32319,32781,45864,
%T A236056 61215,72555,72561,82146,83259,86604,91371,95199,125334,149331,176889,
%U A236056 182910,185535,210846,225666,226254,288420,343161,350091,403941,411501,510399,567204
%N A236056 Numbers k such that k^2 +- k +- 1 is prime for all four possibilities.
%C A236056 The only prime in this sequence is a(1) = 3.
%e A236056 1365^2 + 1365 + 1 = 1864591,
%e A236056 1365^2 + 1365 - 1 = 1864589,
%e A236056 1365^2 - 1365 + 1 = 1861861, and
%e A236056 1365^2 - 1365 - 1 = 1861859 are all prime, so 1365 is a term of this sequence.
%p A236056 q:= k-> andmap(isprime, [seq(seq(k^2+i+j, j=[k, -k]), i=[1, -1])]):
%p A236056 select(q, [3*t$t=1..200000])[];  # _Alois P. Heinz_, Feb 25 2020
%t A236056 Select[Range[568000],AllTrue[Flatten[{#^2+#+{1,-1},#^2-#+{1,-1}},1],PrimeQ]&] (* _Harvey P. Dale_, Jul 31 2022 *)
%o A236056 (Python)
%o A236056 import sympy
%o A236056 from sympy import isprime
%o A236056 {print(p) for p in range(10**6) if isprime(p**2+p+1) and isprime(p**2-p+1) and isprime(p**2+p-1) and isprime(p**2-p-1)}
%Y A236056 Numbers in the intersection of A002384, A045546, A055494, and A002328.
%Y A236056 Numbers in the intersection of A131530 and A088485.
%K A236056 nonn
%O A236056 1,1
%A A236056 _Derek Orr_, Jan 18 2014