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.

A242886 Smallest prime p_n which generates n primes of the form (p^i + 2) where i represents the first n odd numbers.

This page as a plain text file.
%I A242886 #26 May 22 2025 10:21:37
%S A242886 3,3,419,132749,514664471,1164166301,364231372931
%N A242886 Smallest prime p_n which generates n primes of the form (p^i + 2) where i represents the first n odd numbers.
%C A242886 The first 4 entries of this sequence are the first entry of the following sequences:
%C A242886 a. A001359: Lesser of twin primes.
%C A242886 b. A240110: Primes p such that p + 2 and p^3 + 2 are also prime.
%C A242886 c. A242326: Primes p for which p + 2, p^3 + 2, and p^5 + 2 are also prime.
%C A242886 d. A242327: Primes p for which (p^n) + 2 is prime for n = 1, 3, 5, and 7.
%C A242886 a(8) > 10^14. - _Bert Dobbelaere_, Aug 31 2020
%e A242886 For n = 1, p = 3 generates primes of the form p^n + 2; for i = 1,
%e A242886    p + 2 = 5 (prime).
%e A242886 For n = 2, p = 3 generates primes of the form p^n + 2; for i = 1 and 3,
%e A242886    p + 2 = 5 (prime) and p^3 + 2 = 29 (prime).
%e A242886 For n = 3, p = 419 generates primes of the form p^n + 2; for i = 1, 3, and  5, p + 2 = 421 (prime), p^3 + 2 = 73560061 (prime), and p^5 + 2 = 12914277518101 (prime).
%o A242886 (Python)
%o A242886 import sympy
%o A242886 ## isp_list returns an array of true/false for prime number test for a
%o A242886 ## list of numbers
%o A242886 def isp_list(ls):
%o A242886     pt=[]
%o A242886     for a in ls:
%o A242886         if sympy.ntheory.isprime(a)==True:
%o A242886             pt.append(True)
%o A242886     return(pt)
%o A242886 co=1
%o A242886 while co < 7:
%o A242886     al=0
%o A242886     n=2
%o A242886     while al!=co:
%o A242886         d=[]
%o A242886         for i in range(0,co):
%o A242886             d.append(int(n**((2*i)+1))+2)
%o A242886         al=isp_list(d).count(True)
%o A242886         if al==co:
%o A242886             ## Prints prime number and its corresponding sequence d
%o A242886             print(n,d)
%o A242886         n=sympy.ntheory.nextprime(n)
%o A242886     co=co+1
%Y A242886 Cf. A001359, A240110, A242326, A242327.
%K A242886 nonn,hard,more
%O A242886 1,1
%A A242886 _Abhiram R Devesh_, May 25 2014
%E A242886 a(7) from _Bert Dobbelaere_, Aug 30 2020