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.

A240126 Primes p such that p - 2 and p^3 - 2 are also prime.

This page as a plain text file.
%I A240126 #22 Apr 06 2020 09:09:29
%S A240126 19,31,109,151,241,619,859,1489,1951,2131,2791,2971,3559,4129,4651,
%T A240126 4789,4801,5659,6661,6781,7591,8221,8629,8821,8971,9241,9721,9931,
%U A240126 10891,11971,12109,12541,13831,14011,15271,15289,15331,16831,17029,17419,17839,17989,18121,18541,20149,20899,21019
%N A240126 Primes p such that p - 2 and p^3 - 2 are also prime.
%C A240126 All the terms in the sequence are congruent to 1 mod 3.
%H A240126 K. D. Bajpai, <a href="/A240126/b240126.txt">Table of n, a(n) for n = 1..3085</a>
%e A240126 19 is in the sequence because 19 is a prime: 19 - 2 = 17 and 19^3 - 2 = 6857 are also prime.
%e A240126 151 is in the sequence because 151 is a prime: 151 - 2 = 149 and 151^3 - 2 = 3442949 are also prime.
%p A240126 KD := proc() local a,b,d; a:=ithprime(n); b:=a-2; d:=a^3-2;  if isprime(b)and isprime(d) then RETURN (a); fi; end: seq(KD(), n=1..10000);
%t A240126 Select[Prime[Range[2000]], PrimeQ[# - 2] && PrimeQ[#^3 - 2] &]
%o A240126 (PARI) s=[]; forprime(p=2, 22000, if(isprime(p-2) && isprime(p^3-2), s=concat(s, p))); s \\ _Colin Barker_, Apr 02 2014
%Y A240126 Intersection of A006512 and A178251.
%Y A240126 Cf. A048637, A140454, A175234, A236687, A236688, A240110.
%K A240126 nonn
%O A240126 1,1
%A A240126 _K. D. Bajpai_, Apr 01 2014