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 A371065 #40 Mar 31 2024 02:07:44 %S A371065 2,3,7,11,13,29,37,53,61,89,127,131,157,197,223,269,307,359,367,419, %T A371065 463,491,547,593,607,641,643,701,823,947,1213,1229,1237,1319,1327, %U A371065 1451,1723,2381,3019,3299,3307,3371,3847,4493,4621,4931,5179,5783,6043,6197,6469 %N A371065 a(1)=2; for n > 1, a(n) is the least prime number p > a(n-1) such that p + 2^(n-1) is a prime number. %H A371065 Amiram Eldar, <a href="/A371065/b371065.txt">Table of n, a(n) for n = 1..5000</a> %e A371065 For n=5, the preceding term a(4)=11 and 2^(5-1)=16, so a(5) is the least prime p > 11 such that p+16 is a prime too, which is p = 13 = a(5). %e A371065 From _Michael De Vlieger_, Mar 10 2024: (Start) %e A371065 Table of first terms: %e A371065 n a(n) 2^(n+1) a(n)+2^(n+1) %e A371065 ------------------------------- %e A371065 1 2 1 3 %e A371065 2 3 2 5 %e A371065 3 7 4 11 %e A371065 4 11 8 19 %e A371065 5 13 16 29 %e A371065 6 29 32 61 %e A371065 7 37 64 101 %e A371065 8 53 128 181 %e A371065 9 61 256 317 %e A371065 10 89 512 601 %e A371065 11 127 1024 1151 %e A371065 12 131 2048 2179 %e A371065 ... (End) %t A371065 a[1] = 2; a[n_] := a[n] = Module[{p = NextPrime[a[n - 1]]}, While[! PrimeQ[p + 2^(n - 1)], p = NextPrime[p]]; p]; Array[a, 50] (* _Amiram Eldar_, Mar 10 2024 *) %Y A371065 Cf. A108184, A056206. %K A371065 nonn %O A371065 1,1 %A A371065 _Ahmad J. Masad_, Mar 09 2024