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 A040081 #43 Dec 05 2024 12:57:04 %S A040081 2,1,0,0,2,0,1,0,1,1,2,0,3,0,1,1,2,0,1,0,1,1,4,0,3,2,1,3,4,0,1,0,2,1, %T A040081 2,1,1,0,3,1,2,0,7,0,1,3,4,0,1,2,1,1,2,0,1,2,1,3,12,0,3,0,2,1,4,1,5,0, %U A040081 1,1,2,0,7,0,1,1,2,2,1,0,3,1,2,0,5,6,1,23,4,0,1,2,3,3,2,1,1,0,1,1,10,0,3 %N A040081 Riesel problem: a(n) = smallest m >= 0 such that n*2^m-1 is prime, or -1 if no such prime exists. %H A040081 Eric Chen, <a href="/A040081/b040081.txt">Table of n, a(n) for n = 1..2292</a> (first 1000 terms from T. D. Noe) %H A040081 Matteo Cati and Dmitrii V. Pasechnik, <a href="https://arxiv.org/abs/2411.18897">A database of constructions of Hadamard matrices</a>, arXiv:2411.18897 [math.CO], 2024. See p. 14. %H A040081 Hans Riesel, <a href="/A076337/a076337.pdf">Some large prime numbers</a>. Translated from the Swedish original (NĂ¥gra stora primtal, Elementa 39 (1956), pp. 258-260) by Lars Blomberg. %t A040081 Table[m = 0; While[! PrimeQ[n*2^m - 1], m++]; m, {n, 100}] (* _Arkadiusz Wesolowski_, Sep 04 2011 *) %o A040081 (Haskell) %o A040081 a040081 = length . takeWhile ((== 0) . a010051) . %o A040081 iterate ((+ 1) . (* 2)) . (subtract 1) %o A040081 -- _Reinhard Zumkeller_, Mar 05 2012 %o A040081 (PARI) a(n)=for(k=0,2^16,if(ispseudoprime(n*2^k-1), return(k))) \\ _Eric Chen_, Jun 01 2015 %o A040081 (Python) %o A040081 from sympy import isprime %o A040081 def a(n): %o A040081 m = 0 %o A040081 while not isprime(n*2**m - 1): m += 1 %o A040081 return m %o A040081 print([a(n) for n in range(1, 88)]) # _Michael S. Branicky_, Feb 01 2021 %Y A040081 Main sequences for Riesel problem: A038699, A040081, A046069, A050412, A052333, A076337, A101036, A108129. %Y A040081 Cf. A010051, A000079. %K A040081 nonn %O A040081 1,1 %A A040081 _David W. Wilson_