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.

A346167 Primes p such that p*p! + 1 is also prime.

This page as a plain text file.
%I A346167 #31 Apr 08 2025 10:42:10
%S A346167 2,3,5,7,19,23,149,151,197,37691
%N A346167 Primes p such that p*p! + 1 is also prime.
%p A346167 select(p -> isprime(p) and isprime(p*factorial(p) + 1), [$2 .. 200]);
%t A346167 Select[Range[2, 200], PrimeQ[#] && PrimeQ[#*#! + 1] &]
%t A346167 Select[Prime[Range[100]],PrimeQ[#*#!+1]&] (* _Harvey P. Dale_, Mar 21 2025 *)
%o A346167 (PARI) a = List(); for(p=2, 200, if(isprime(p) && isprime(p*p!+1), listput(a, p))); a
%o A346167 (Sage) [p for p in range(2, 200) if is_prime(p) and is_prime(p*factorial(p) + 1)]
%Y A346167 Prime terms of A090703.
%Y A346167 Cf. A346168.
%K A346167 nonn,more
%O A346167 1,1
%A A346167 _Reza K Ghazi_, Jul 08 2021
%E A346167 a(10) from _Georg Grasegger_, Apr 07 2025