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.

A242564 Least prime p such that p*10^n+1, p*10^n+3, p*10^n+7 and p*10^n+9 are all prime.

This page as a plain text file.
%I A242564 #11 May 22 2025 10:21:37
%S A242564 19,1657,13,9001,283,115201,61507,249439,375127,472831,786823,172489,
%T A242564 1237,2359033,163063,961981,1442017,457,1208833,4845583,1146877,
%U A242564 11550193,436831,1911031,581047,4504351,215737,3685051,27805381,1343791,82491967,15696349,20446423
%N A242564 Least prime p such that p*10^n+1, p*10^n+3, p*10^n+7 and p*10^n+9 are all prime.
%e A242564 2*10^3+1 (2001), 2*10^3+3 (2003), 2*10^3+7 (2007) and 2*10^3+9 (2009) are not all prime.
%e A242564 3*10^3+1 (3001), 3*10^3+3 (3003), 3*10^3+7 (3007) and 3*10^3+9 (3009) are not all prime.
%e A242564 5*10^3+1 (5001), 5*10^3+3 (5003), 5*10^3+7 (5007) and 5*10^3+9 (5009) are not all prime.
%e A242564 7*10^3+1 (7001), 7*10^3+3 (7003), 7*10^3+7 (7007) and 7*10^3+9 (7009) are not all prime.
%e A242564 11*10^3+1 (11001), 11*10^3+3 (11003), 11*10^3+7 (11007) and 11*10^3+9 (11009) are not all prime.
%e A242564 13*10^3+1 (13001), 13*10^3+3 (13003), 13*10^3+7 (13007) and 13*10^3+9 (13009) are all prime. Thus, a(3) = 13.
%t A242564 lpp[n_]:=Module[{c=10^n,p=2},While[Not[AllTrue[p*c+{1,3,7,9},PrimeQ]], p= NextPrime[ p]];p]; Array[lpp,40] (* _Harvey P. Dale_, Mar 24 2018 *)
%o A242564 (Python)
%o A242564 import sympy
%o A242564 from sympy import isprime
%o A242564 from sympy import prime
%o A242564 def Pr(n):
%o A242564   for p in range(1,10**7):
%o A242564     if isprime(prime(p)*(10**n)+1) and isprime(prime(p)*(10**n)+3) and isprime(prime(p)*(10**n)+7) and isprime(prime(p)*(10**n)+9):
%o A242564       return prime(p)
%o A242564 n = 1
%o A242564 while n < 50:
%o A242564   print(Pr(n))
%o A242564   n += 1
%Y A242564 Cf. A067267, A236042, A242562, A064281.
%K A242564 nonn,hard
%O A242564 1,1
%A A242564 _Derek Orr_, May 17 2014