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.

A236173 Primes p such that p^2 - p - 1, p^3 - p - 1 and p^4 - p - 1 are all prime.

This page as a plain text file.
%I A236173 #16 Apr 09 2019 09:23:54
%S A236173 11,71,11621,28151,32089,37501,39209,45329,66161,76649,114599,122131,
%T A236173 136949,154991,202999,228901,243391,270269,296911,313909,318679,
%U A236173 333701,343309,359291,369979,371281,371981,373171,373459
%N A236173 Primes p such that p^2 - p - 1, p^3 - p - 1 and p^4 - p - 1 are all prime.
%C A236173 Primes in A236171. All primes appear to end in a 1 or a 9 (congruent to either 1 mod 10 or 9 mod 10).
%H A236173 Harvey P. Dale, <a href="/A236173/b236173.txt">Table of n, a(n) for n = 1..1000</a>
%e A236173 228901 is prime, 228901^2 - 228901 - 1 is prime, 228901^3 - 228901 - 1 is prime, and 228901^4 - 228901 - 1 is prime. So 228901 is a member of this sequence.
%t A236173 Select[Prime[Range[32000]],AllTrue[#^{2,3,4}-#-1,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 08 2019 *)
%o A236173 (Python)
%o A236173 import sympy
%o A236173 from sympy import isprime
%o A236173 {print(p) for p in range(10**6) if isprime(p) and isprime(p**2-p-1) and isprime(p**3-p-1) and isprime(p**4-p-1)}
%o A236173 (PARI)
%o A236173 s=[]; forprime(p=2, 400000, if(isprime(p^2-p-1) && isprime(p^3-p-1) && isprime(p^4-p-1), s=concat(s, p))); s \\ _Colin Barker_, Jan 20 2014
%Y A236173 Cf. A091567, A236168, A236071.
%K A236173 nonn
%O A236173 1,1
%A A236173 _Derek Orr_, Jan 19 2014