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 A057673 #20 Nov 29 2021 01:39:29 %S A057673 3,5,2,3,3,3,3,19,5,3,3,19,3,13,3,19,17,13,5,19,3,19,3,37,3,61,5,79, %T A057673 89,3,41,19,5,79,41,31,5,31,107,7,167,31,11,67,17,139,167,127,59,139, %U A057673 71,139,47,379,53,67,5,13,137,607,107,31,167,409,59,79,5,19,23,19,71,577,107 %N A057673 Smallest prime p such that |2^n - p| is a prime. %C A057673 The absolute value is relevant only for first two terms, 2^0-a(0) = 1-3 = -2, 2^1-a(1) = 2-5 = -3. According to Goldbach's conjecture, every even number > 2 is the sum of two primes, which implies that for all further terms, a(n) < 2^n. - _M. F. Hasler_, Jan 13 2011 %H A057673 Hugo Pfoertner, <a href="/A057673/b057673.txt">Table of n, a(n) for n = 0..5000</a> %e A057673 n=7, 2^n=128. The smallest terms subtracted from 128 resulting in a prime are 1,15,19,... Neither 1 nor 15 are primes but 19 is a prime. It gives 109=128-19, so a(n)=19. %t A057673 f[n_] := Block[{p = 2}, While[! PrimeQ[2^n - p], p = NextPrime@ p]; p]; Array[f, 60, 0] %o A057673 (PARI) A057673(n)=forprime( p=1,default(primelimit), ispseudoprime(abs(2^n-p))& return(p)) %Y A057673 Analog of A056206. Cf. A056208, A057662. %K A057673 nonn %O A057673 0,1 %A A057673 _Labos Elemer_, Oct 19 2000 %E A057673 Offset corrected and initial term added by _M. F. Hasler_, Jan 13 2011