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 A057160 #26 May 27 2022 15:36:41 %S A057160 3,2,1,1,4,1,6,1,90,111,244,139,880,309,22263,56083,130141,49905 %N A057160 Smallest value of k for which the expression k*2^(2^n-1)-1 is prime. %F A057160 a(n) = A053989(A058891(n+1)). - _Pontus von Brömssen_, May 27 2022 %e A057160 a(1)=2 because 2*2^(2^1-1)-1 = 2*2^1-1 = 3 which is prime. - _Sean A. Irvine_, May 25 2022 %e A057160 a(4)=4 because 4*2^(2^4-1)-1 = 4*2^15-1 = 4*32768-1 = 131071 which is prime. %t A057160 svk[n_]:= Module[{k = 1, c = 2^(2^n-1)}, While[!PrimeQ[k*c-1],k++];k]; Join[{2}, svk /@ Range[17]] (* _Harvey P. Dale_, Feb 03 2021, adjusted for new offset by _Michael De Vlieger_, May 25 2022 *) %o A057160 (Python) %o A057160 from sympy import isprime %o A057160 def a(n): %o A057160 k, c = 1, 2**(2**n-1) %o A057160 while not isprime(k*c - 1): k += 1 %o A057160 return k %o A057160 print([a(n) for n in range(1, 12)]) # _Michael S. Branicky_, May 25 2022 %o A057160 (PARI) a(n) = my(k=1); while (!isprime(k*2^(2^n-1)-1), k++); k; \\ _Michel Marcus_, May 27 2022 %Y A057160 Cf. A053989, A058891, A077585 (2^(2^n-1)-1). %K A057160 nonn,more %O A057160 0,1 %A A057160 _Steven Harvey_, Sep 14 2000 %E A057160 Offset and a(1) corrected by _Sean A. Irvine_, May 25 2022 %E A057160 a(0) prepended by _Michel Marcus_, May 27 2022