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.

A271666 Primes p such that 4*p^2+4*p-1 is prime.

This page as a plain text file.
%I A271666 #18 Sep 08 2022 08:46:16
%S A271666 2,3,7,13,17,23,31,37,53,59,67,139,149,151,157,167,179,193,199,223,
%T A271666 233,293,307,331,359,373,389,431,479,571,587,619,643,653,683,809,839,
%U A271666 857,863,919,937,947,1021,1091,1123,1151,1187,1277,1301,1367,1427,1511
%N A271666 Primes p such that 4*p^2+4*p-1 is prime.
%H A271666 Vincenzo Librandi, <a href="/A271666/b271666.txt">Table of n, a(n) for n = 1..1000</a>
%t A271666 Select[Prime[Range[300]], PrimeQ[4 #^2 + 4 # - 1] &]
%o A271666 (Magma) [p: p in PrimesUpTo(2000) | IsPrime(4*p^2+4*p-1)];
%o A271666 (PARI) lista(nn) = forprime(p=2, nn, if(isprime(4*p^2+4*p-1), print1(p, ", "))); \\ _Altug Alkan_, Apr 12 2016
%o A271666 (Python)
%o A271666 from gmpy2 import is_prime
%o A271666 for p in range(3,10**5,2):
%o A271666     if(not is_prime(p)):continue
%o A271666     elif(is_prime(6*p**2+6*p-1)):print(p)
%o A271666 # _Soumil Mandal_, Apr 14 2016
%Y A271666 Cf. A171139, A171831, A171832, A261810.
%K A271666 nonn,easy
%O A271666 1,1
%A A271666 _Vincenzo Librandi_, Apr 12 2016