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.
%I A243269 #22 Sep 24 2024 14:59:32 %S A243269 5,19,31,201829,131681731,954667531,8998333416049 %N A243269 Smallest prime p such that p^k - 2 is prime for all odd exponents k from 1 up to 2*n-1 (inclusive). %C A243269 The first 4 entries of this sequence are the first entry of the following sequences: %C A243269 A006512 : Primes p such that p - 2 is also prime. %C A243269 A240126 : Primes p such that p - 2 and p^3 - 2 are also prime. %C A243269 A242517 : Primes p such that p - 2, p^3 - 2 and p^5 - 2 are primes. %C A243269 A242518 : Primes p such that p - 2, p^3 - 2, p^5 - 2 and p^7 - 2 are primes. %e A243269 For n = 1, p = 5, p - 2 = 3 is prime. %e A243269 For n = 2, p = 19, p - 2 = 17 and p^3 - 2 = 6857 are primes. %e A243269 For n = 3, p = 31, p - 2 = 29, p^3 - 2 = 29789, and p^5 - 2 = 28629149 are primes. %o A243269 (Python) %o A243269 import sympy %o A243269 ## isp_list returns an array of true/false for prime number test for a %o A243269 ## list of numbers %o A243269 def isp_list(ls): %o A243269 pt=[] %o A243269 for a in ls: %o A243269 if sympy.ntheory.isprime(a)==True: %o A243269 pt.append(True) %o A243269 return(pt) %o A243269 co=1 %o A243269 while co < 7: %o A243269 al=0 %o A243269 n=2 %o A243269 while al!=co: %o A243269 d=[] %o A243269 for i in range(0, co): %o A243269 d.append(int(n**((2*i)+1))-2) %o A243269 al=isp_list(d).count(True) %o A243269 if al==co: %o A243269 ## Prints prime number and its corresponding sequence d %o A243269 print(n, d) %o A243269 n=sympy.ntheory.nextprime(n) %o A243269 co=co+1 %Y A243269 Cf. A006512, A240126, A242517 and A242518. %K A243269 nonn,hard,more %O A243269 1,1 %A A243269 _Abhiram R Devesh_, Jun 02 2014 %E A243269 a(7) from _Bert Dobbelaere_, Aug 30 2020