Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Jul 18 2019 02:53:39
%S 7,11,11,971,71394923,959316767,13342820302307
%N 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 The first 4 entries of this sequence are the first entry of the following sequences:
%C A046132 : Larger member p+4 of cousin primes (p, p+4).
%C A243817 : Primes p for which p - 4 and p^3 - 4 are primes.
%C A243818 : Primes p for which p^i - 4 is prime for i = 1, 3 and 5.
%C A243861 : Primes p for which p^i - 4 is prime for i = 1, 3, 5 and 7.
%e a(1) = 7 because 7-4 = 3 (prime),
%e a(2) = 11 because 11-4 = 7 (prime) and 11^3 - 4 = 1327 (prime).
%o (Python)
%o import sympy
%o ## isp_list returns an array of true/false for prime number test for a
%o ## list of numbers
%o def isp_list(ls):
%o ....pt=[]
%o ....for a in ls:
%o ........if sympy.ntheory.isprime(a)==True:
%o ............pt.append(True)
%o ....return(pt)
%o co=1
%o while co > 0:
%o ....al=0
%o ....n=2
%o ....while al!=co:
%o ........d=[]
%o ........for i in range(0, co):
%o ............d.append(int(n**((2*i)+1))-4)
%o ........al=isp_list(d).count(True)
%o ........if al==co:
%o ............## Prints prime number and its corresponding sequence d
%o ............print(n, d)
%o ........n=sympy.ntheory.nextprime(n)
%o ....co=co+1
%Y Cf. A046132, A243817, A243818 and A243861.
%K nonn,hard,more
%O 1,1
%A _Abhiram R Devesh_, Jun 13 2014
%E a(6) from _Bert Dobbelaere_, Jul 16 2019
%E a(7) from _Giovanni Resta_, Jul 18 2019