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.

A243411 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 A243411 #13 May 22 2025 10:21:38
%S A243411 2,2,10193,24851,20549,719,22133,230471,46679,432449,114689,227603,
%T A243411 305297,61463,1866467,866309,1189403,362081,2615783,493433,966353,
%U A243411 4154363,6562931,9096203,3701627,3128813,20983727,303593,24437537,1068491
%N A243411 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.
%t A243411 lpp[n_]:=Module[{p=2,c=10^n},While[!AllTrue[p*c-{1,3,7,9}, PrimeQ], p= NextPrime[ p]];p]; Array[lpp,30] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jun 12 2016 *)
%o A243411 (Python)
%o A243411 import sympy
%o A243411 from sympy import isprime
%o A243411 from sympy import prime
%o A243411 def a(n):
%o A243411   for k in range(1,10**8):
%o A243411     if isprime(prime(k)*10**n-1) and isprime(prime(k)*10**n-3) and isprime(prime(k)*10**n-7) and isprime(prime(k)*10**n-9):
%o A243411       return prime(k)
%o A243411 n = 1
%o A243411 while n < 100:
%o A243411   print(a(n),end=', ')
%o A243411   n+=1
%o A243411 (PARI) a(n)=for(k=1,10^8,if(ispseudoprime(prime(k)*10^n-1) && ispseudoprime(prime(k)*10^n-3) && ispseudoprime(prime(k)*10^n-7) && ispseudoprime(prime(k)*10^n-9), return(prime(k))))
%o A243411 n=1;while(n<100,print1(a(n),", ");n++)
%Y A243411 Cf. A242564, A064432.
%K A243411 nonn
%O A243411 1,1
%A A243411 _Derek Orr_, Jun 04 2014