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 A099478 #18 Apr 18 2025 08:55:06 %S A099478 2,1,3,1,1,4,3,6,1,1,4,2,9,4,9,14,4,1,3,4,36,5,25,4,10,4,18,3,21,9,9, %T A099478 21,16,65,12,8,51,1,22,2,30,6,10,63,1,30,15,3,10,1,22,57,202,4,3,53,1, %U A099478 34,12,10,22,29,28,31,7,6,70,29,16,94,37,51,30,56,19,23,70,50,99,16,34,5 %N A099478 Least k such that k*2^n*(2^n-1) - 1 is prime. %C A099478 Least k such that k*A020522(n)-1 is prime. - _Michel Marcus_, Apr 13 2021 %H A099478 Robert Israel, <a href="/A099478/b099478.txt">Table of n, a(n) for n = 1..2090</a> %e A099478 1*2^6*(2^6-1) - 1 = 4031 = 29*139 %e A099478 2*2^6*(2^6-1) - 1 = 8063 = 11*733 %e A099478 3*2^6*(2^6-1) - 1 = 12095 = 5*2419 %e A099478 4*2^6*(2^6-1) - 1 = 16127, which is prime, so a(6)=4. %p A099478 f:= proc(n) local c,k; %p A099478 c:= 2^n*(2^n-1); %p A099478 for k from 1 do if isprime(c*k-1) then return k fi od %p A099478 end proc: %p A099478 map(f, [$1..100]); # _Robert Israel_, Apr 12 2021 %t A099478 a[n_]:=Module[{k=1},While[!PrimeQ[k*2^n*(2^n-1)-1], k++]; k]; Array[a,82] (* _Stefano Spezia_, Apr 18 2025 *) %o A099478 (PARI) a(n) = my(k=1); while(!isprime(k*2^n*(2^n-1) - 1), k++); k; \\ _Michel Marcus_, Apr 13 2021 %Y A099478 Cf. A020522. %K A099478 nonn %O A099478 1,1 %A A099478 _Pierre CAMI_, Nov 18 2004