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 A108234 #20 Jan 19 2025 17:47:26 %S A108234 1,0,0,2,0,1,0,1,1,2,0,3,0,1,1,2,0,1,0,1,1,2,0,2,2,1,2,2,0,1,0,2,1,2, %T A108234 1,1,0,3,1,2,0,3,0,1,2,3,0,1,2,1,1,2,0,1,2,1,2,2,0,2,0,2,1,2,1,4,0,1, %U A108234 1,2,0,3,0,1,1,2,2,1,0,3,1,2,0,2,3,1,2,2,0,1,2,3,2,2,1,1,0,1,1,2 %N A108234 Minimum m such that n*2^m+k is prime, for k < 2^m. In other words, assuming you've read n out of a binary stream, a(n) is the minimum number of additional bits (appended to the least significant end of n) you must read before it is possible to obtain a prime. %C A108234 Somewhat related to the Riesel problem, A040081, the minimum m such that n*2^m-1 is prime. %H A108234 Antti Karttunen, <a href="/A108234/b108234.txt">Table of n, a(n) for n = 1..16384</a> %e A108234 a(12) = 3 because 12 = 1100 in binary and 97 = 1100001 is the first prime that starts with 1100, needing 3 extra bits. %o A108234 (MATLAB) % and Octave. %o A108234 for n=1:100;m=0;k=0;while(~isprime(n*2^m+k))k=k+1;if k==2^m k=0;m=m+1;end;end;x(n)=m;end;x %o A108234 (PARI) A108234(n) = { my(m=0,k=0); while(!isprime((n*2^m)+k), k=k+1; if(2^m==k, k=0; m=m+1)); m; }; \\ _Antti Karttunen_, Dec 16 2017, after Octave/MATLAB code %Y A108234 Cf. A040081, A091991, A164022 (smallest prime). %K A108234 easy,nonn %O A108234 1,4 %A A108234 _Mike Stay_, Jun 16 2005 %E A108234 Definition clarified by _Antti Karttunen_, Dec 16 2017