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.

A243885 Smallest prime p_n which generates n primes of the form (p_n^i - 4) when i runs through the first n odd numbers.

This page as a plain text file.
%I A243885 #18 May 22 2025 10:21:38
%S A243885 7,11,11,971,71394923,959316767,13342820302307
%N A243885 Smallest prime p_n which generates n primes of the form (p_n^i - 4) when i runs through the first n odd numbers.
%C A243885 The first 4 entries of this sequence are the first entry of the following sequences:
%C A243885 A046132 : Larger member p+4 of cousin primes (p, p+4).
%C A243885 A243817 : Primes p for which p - 4 and p^3 - 4 are primes.
%C A243885 A243818 : Primes p for which p^i - 4 is prime for i = 1, 3 and 5.
%C A243885 A243861 : Primes p for which p^i - 4 is prime for i = 1, 3, 5 and 7.
%e A243885 a(1) = 7 because 7-4 = 3 (prime),
%e A243885 a(2) = 11 because 11-4 = 7 (prime) and  11^3 - 4 = 1327 (prime).
%o A243885 (Python)
%o A243885 import sympy
%o A243885 ## isp_list returns an array of true/false for prime number test for a
%o A243885 ## list of numbers
%o A243885 def isp_list(ls):
%o A243885     pt=[]
%o A243885     for a in ls:
%o A243885         if sympy.ntheory.isprime(a)==True:
%o A243885             pt.append(True)
%o A243885     return(pt)
%o A243885 co=1
%o A243885 while co > 0:
%o A243885     al=0
%o A243885     n=2
%o A243885     while al!=co:
%o A243885         d=[]
%o A243885         for i in range(0, co):
%o A243885             d.append(int(n**((2*i)+1))-4)
%o A243885         al=isp_list(d).count(True)
%o A243885         if al==co:
%o A243885             ## Prints prime number and its corresponding sequence d
%o A243885             print(n, d)
%o A243885         n=sympy.ntheory.nextprime(n)
%o A243885     co=co+1
%Y A243885 Cf. A046132, A243817, A243818 and A243861.
%K A243885 nonn,hard,more
%O A243885 1,1
%A A243885 _Abhiram R Devesh_, Jun 13 2014
%E A243885 a(6) from _Bert Dobbelaere_, Jul 16 2019
%E A243885 a(7) from _Giovanni Resta_, Jul 18 2019