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.

A237642 Primes of the form n^2-n-1 (for some n) such that p^2-p-1 is also prime.

This page as a plain text file.
%I A237642 #11 Feb 27 2023 14:47:13
%S A237642 5,11,29,71,131,181,379,419,599,1979,2069,3191,4159,13339,14519,17291,
%T A237642 19739,20879,21169,26731,30449,31151,39799,48619,69959,70489,112559,
%U A237642 122849,132859,139501,149381,183611,186191,198469,212981,222311,236681
%N A237642 Primes of the form n^2-n-1 (for some n) such that p^2-p-1 is also prime.
%C A237642 Except a(1), all numbers are congruent to 1 mod 10 or 9 mod 10.
%H A237642 Harvey P. Dale, <a href="/A237642/b237642.txt">Table of n, a(n) for n = 1..1000</a>
%e A237642 11 is prime and equals 4^2-4-1, and 11^2-11-1 = 109 is prime. So, 11 is a member of this sequence.
%t A237642 Select[Table[n^2-n-1,{n,500}],AllTrue[{#,#^2-#-1},PrimeQ]&] (* _Harvey P. Dale_, Feb 27 2023 *)
%o A237642 (Python)
%o A237642 import sympy
%o A237642 from sympy import isprime
%o A237642 {print(n**2-n-1) for n in range(10**3) if isprime(n**2-n-1) and isprime((n**2-n-1)**2-(n**2-n-1)-1)}
%o A237642 (PARI)
%o A237642 s=[]; for(n=1, 1000, p=n^2-n-1; if(isprime(p) && isprime(p^2-p-1), s=concat(s, p))); s \\ _Colin Barker_, Feb 11 2014
%Y A237642 Cf. A002327, A091568.
%K A237642 nonn
%O A237642 1,1
%A A237642 _Derek Orr_, Feb 10 2014