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 A057775 #33 Mar 16 2025 13:11:38 %S A057775 2,3,5,41,17,97,193,641,257,7681,13313,18433,12289,40961,114689, %T A057775 163841,65537,1179649,786433,5767169,7340033,23068673,104857601, %U A057775 377487361,754974721,167772161,469762049,2013265921,3489660929,12348030977,3221225473,75161927681 %N A057775 a(n) is the least prime p such that p-1 is divisible by 2^n and not by 2^(n+1). %C A057775 If we drop the requirement that p-1 must not be divisible by 2^(n+1), we get instead A035089, which is a nondecreasing sequence. - _Jeppe Stig Nielsen_, Aug 09 2015 %H A057775 Donovan Johnson, <a href="/A057775/b057775.txt">Table of n, a(n) for n = 0..1000</a> %F A057775 a(n) = prime(A057776(n+1)). - _Amiram Eldar_, Mar 16 2025 %e A057775 a(13) = 40961 = 1 + 8192*5 where the last term is divisible by the 13th power of 2 and 40961 is the smallest prime with that property. %p A057775 f:= proc(n) local p; %p A057775 for p from 2^n+1 by 2^(n+1) do %p A057775 if isprime(p) then return p fi %p A057775 od %p A057775 end proc: %p A057775 map(f, [$0..100]); # _Robert Israel_, Aug 10 2015 %t A057775 Table[k = 1; While[p = k*2^n + 1; ! PrimeQ[p], k = k + 2]; p, {n, 0, 40}] (* _T. D. Noe_, Dec 27 2011 *) %o A057775 (PARI) a(n)=forstep(k=1,9e99,2,isprime((k<<n)+1)&return((k<<n)+1)) \\ _Jeppe Stig Nielsen_, Aug 09 2015 %Y A057775 Cf. A000040, A006093, A035050, A035089, A057776, A126717, A201914. %K A057775 nonn %O A057775 0,1 %A A057775 _Labos Elemer_, Nov 02 2000 %E A057775 More terms from Larry Reeves (larryr(AT)acm.org), Nov 03 2000