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 A133907 #37 Feb 22 2023 21:19:59 %S A133907 2,3,5,2,2,7,11,2,2,3,3,2,2,17,17,2,2,3,3,2,2,23,29,2,2,5,3,2,2,31,37, %T A133907 2,2,37,37,2,2,3,41,2,2,43,47,2,2,3,3,2,2,5,5,2,2,3,3,2,2,59,61,2,2, %U A133907 67,3,2,2,67,71,2,2,71,73,2,2,3,5,2,2,5,5,2,2,3,3,2,2,89,89,2,2,3,3,2,2,97 %N A133907 Least prime number p such that binomial(n+p, p) mod p = 1. %C A133907 Also the least prime number p such that p divides floor(n/p) or p > n. %C A133907 a(n) = 2 if and only if n is in A042948. - _Robert Israel_, May 11 2017 %C A133907 Conjecture: a(n) is the smallest prime p such that Sum_{k=1..n} k^(p-1) == n (mod p). Thus a(n) >= A317358(n). - _Thomas Ordowski_, Jul 29 2018 %H A133907 Robert Israel, <a href="/A133907/b133907.txt">Table of n, a(n) for n = 1..10000</a> %e A133907 a(2)=3, since binomial(2+3,3) mod 3 = 10 mod 3 = 1 and 3 is the minimal prime number with this property. %e A133907 a(7)=11 because of binomial(7+11, 11) = 31824 = 2893*11 + 1, but binomial(7+k, k) mod k <> 1 for all primes < 11. %p A133907 f:= proc(n) local m; %p A133907 m:= 2: %p A133907 while floor(n/m) mod m <> 0 do m:= nextprime(m) od: %p A133907 m %p A133907 end proc: %p A133907 map(f, [$1..100]); # _Robert Israel_, May 11 2017 %t A133907 a[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[Mod[Binomial[n+p, p], p] == 1, Return[p]]]]; %t A133907 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Feb 05 2023 *) %o A133907 (PARI) a(n) = my(p=2); while (binomial(n+p, p) % p != 1, p = nextprime(p+1)); p; \\ _Michel Marcus_, Dec 17 2022 %o A133907 (Python) %o A133907 from sympy import nextprime, ff %o A133907 def A133907(n): %o A133907 p, m = 2, (n+2)*(n+1)>>1 %o A133907 while m%p != 1: %o A133907 q = nextprime(p) %o A133907 m = m*ff(n+q,q-p)//ff(q,q-p) %o A133907 p = q %o A133907 return p # _Chai Wah Wu_, Feb 22 2023 %Y A133907 Cf. A000040, A042948, A133620, A133621, A133623, A133630, A133635. %Y A133907 Cf. A133872, A133880, A133890, A133900, A133906, A133910, A317358. %K A133907 nonn %O A133907 1,1 %A A133907 _Hieronymus Fischer_, Oct 20 2007