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 A165778 #44 Sep 25 2024 14:23:21 %S A165778 2,4,6,7,8,10,16,19,22,28,43,46,56,58,62,67,74,82,140,160,316,346,376, %T A165778 454,458,487,580,607,1018,1579,1739,1870,2006,3014,3056,6962,7075, %U A165778 7852,8207,9190,11854,14816,23308,29222,33808,40618,47408,50843,58312,98554 %N A165778 Numbers k such that |2^k - 57| is prime. %C A165778 If p = 2^k-57 is prime, then 2^(k-1)*p is in A101260, i.e., a solution to sigma(x)-2x = 56 = 2^3*(2^3-1) = 2*A000396(2). %e A165778 a(3) = 6 since 2^6-57 = 7 is prime. %e A165778 For exponents a(1) = 2 and a(2) = 4, we get 2^a(n)-57 = -53 and -41 which are negative, but which are prime in absolute value. %t A165778 Select[Table[{n, Abs[2^n - 57]}, {n, 0, 100}], PrimeQ[#[[2]]] &][[All,1]] (* _G. C. Greubel_, Apr 08 2016 *) %o A165778 (PARI) lista(nn) = for(n=1, nn, if(ispseudoprime(abs(2^n-57)), print1(n, ", "))); \\ _Altug Alkan_, Apr 08 2016 %o A165778 (Magma) [n: n in [1..1100] | IsPrime(2^n-57)]; // _Vincenzo Librandi_, Apr 09 2016 %o A165778 (Python) %o A165778 from sympy import isprime, nextprime %o A165778 def afind(limit): %o A165778 k, pow2 = 1, 2 %o A165778 for k in range(1, limit+1): %o A165778 if isprime(abs(pow2-57)): %o A165778 print(k, end=", ") %o A165778 k += 1 %o A165778 pow2 *= 2 %o A165778 afind(2100) # _Michael S. Branicky_, Dec 27 2021 %Y A165778 Cf. A096818, A165779, A165780. %K A165778 nonn %O A165778 1,1 %A A165778 _M. F. Hasler_, Oct 11 2009 %E A165778 a(36)-a(42) from _Altug Alkan_, Apr 08 2016 %E A165778 a(43)-a(44) from _Michael S. Branicky_, Dec 27 2021 %E A165778 a(45)-a(49) from _Michael S. Branicky_, May 14 2023 %E A165778 a(50) from _Michael S. Branicky_, Sep 25 2024