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 A106790 #18 Mar 09 2020 09:03:33 %S A106790 1,1,3,1,2,1,7,2,2,1,4,1,2,5,15,1,2,1,4,2,2,1,23,2,6,4,4,1,7,1,31,10, %T A106790 6,10,4,1,18,15,9,1,2,1,17,2,2,1,23,2,4,20,6,1,6,8,10,6,2,1,59,1,2,25, %U A106790 63,2,2,1,67,8,2,1 %N A106790 Smallest k>0 such that binomial(n,k) + 1 is prime. %C A106790 a(n) <= n; for primes p: a(p-1) = 1. %C A106790 The values of n for which a(n)=n yield the sequence A067317. - _Emeric Deutsch_, Aug 27 2007 %C A106790 If a(n) > n/2 then a(n) = n. a(n) = floor(n/2) for n = 2, 5, 37, 47, 124. Are there others? - _Robert Israel_, Mar 09 2020 %H A106790 Robert Israel, <a href="/A106790/b106790.txt">Table of n, a(n) for n = 1..4000</a> %p A106790 a:=proc(n) local k: for k while isprime(1+binomial(n,k))=false do end do: k end proc: seq(a(n), n=1..70); # _Emeric Deutsch_, Aug 27 2007 %t A106790 a[n_] := For[k = 1, True, k++, If[PrimeQ[Binomial[n, k] + 1], Return[k]]]; %t A106790 Array[a, 70] (* _Jean-François Alcover_, Feb 13 2018 *) %Y A106790 Cf. A000040, A067317. %K A106790 nonn %O A106790 1,3 %A A106790 _Reinhard Zumkeller_, May 16 2005 %E A106790 Corrected and extended by _Emeric Deutsch_, Aug 27 2007