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 A057247 #27 May 27 2022 21:11:05 %S A057247 5,7,11,29,23,53,137,1217,47,59,7937,149,83,173 %N A057247 a(n) is the smallest prime of the form 1 + prime(n)*2^m, with m > 0. %C A057247 The prime a(15) has 178 decimal digits. [Corrected by _Sean A. Irvine_, May 27 2022] %H A057247 Alois P. Heinz, <a href="/A057247/b057247.txt">Table of n, a(n) for n = 1..75</a> %H A057247 Jean-François Alcover, <a href="/A057247/a057247.txt">Table of n, a(n) for n=16..50.</a> %F A057247 a(n) = Min{q|q is prime, p(n) is the n-th prime and q = 1+p(n)*2^b(n)}. %e A057247 Sophie-Germain primes are here at n = 1, 2, 3, 5, 9, 10, .. etc. At n = 11, p(11) = 31 and in the sequence of q = 1+31*{2, 4, 8, 16, 32, 64, 128, 256} = {63, 125, 249, 497, 993, 1985, 3969, 7937}, the first prime is 7937, so b(11) = 8, a(11) = 7937. %p A057247 a:= proc(n) option remember; local p, m, t; p:= ithprime(n); %p A057247 for m do t:= 1+p*2^m; if isprime(t) then return t fi od %p A057247 end: %p A057247 seq(a(n), n=1..15); # _Alois P. Heinz_, May 27 2022 %t A057247 a[n_] := (For[pn = Prime[n]; p = 2, p < 3*10^8 (* large enough to compute 50 terms except a(15) *), p = NextPrime[p], m = Log[2, (p-1)/pn]; If[m > 0 && IntegerQ[m], Print["a(", n, ") = ", p]; Return[p]]]; Print["a(", n, ") not found ", p]; 0); Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, Nov 08 2016 *) %o A057247 (Python) %o A057247 from sympy import isprime, prime %o A057247 def a(n): %o A057247 m, pn = 1, prime(n) %o A057247 while not isprime(1 + pn*2**m): m += 1 %o A057247 return 1 + pn*2**m %o A057247 print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, May 27 2022 %Y A057247 Cf. A058887, A005384, A005385, A057192. %K A057247 nonn %O A057247 1,1 %A A057247 _Labos Elemer_, Jan 10 2001 %E A057247 Title clarified by _Sean A. Irvine_, May 27 2022