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 A077005 #33 Sep 21 2024 07:45:07 %S A077005 1,3,4,3,7,13,10,6,5,16,31,31,22,12,9,10,31,56,18,37,66,21,15,85,76, %T A077005 52,27,55,85,118,33,23,70,15,76,131,136,42,29,30,91,172,97,148,100,88, %U A077005 93,57,115,175,40,121,226,43,44,45,136,231,211,142,88,22,78,157,238,71,281 %N A077005 Smallest k such that prime(n) divides k*prime(n-1) + 1, n > 1. %C A077005 a(n) = inverse of (prime(n)-prime(n-1)) mod prime(n). This is the least k such that prime(n)|k*((prime(n)-prime(n-1))-1). Since prime(n)|k*prime(n), it must divide (k*prime(n-1)+1), so k = a(n). Also, a(n) = prime(n) - (x*prime(n)+1)/prime(n-1) for the least such x. - _David James Sycamore_, Oct 05 2018 %F A077005 a(n) = prime(n) - A069830(n - 1). - _Emmanuel Vantieghem_, Aug 12 2018 [Corrected by _Georg Fischer_, Sep 21 2024] %e A077005 a(4) = 3 as prime(5) = 11 divides 3*7 + 1, where 7 = prime(4). %t A077005 sk[a_,b_]:=Module[{k=1},While[!Divisible[k*a+1,b],k++];k]; sk@@@ Partition[ Prime[Range[70]],2,1] (* _Harvey P. Dale_, Jun 23 2013 *) %o A077005 (PARI) a(n) = {my(k = 1, p = prime(n-1), q = prime(n)); while ((k*p+1) % q, k++); k;} \\ _Michel Marcus_, Aug 14 2018 %Y A077005 Cf. A069830. %K A077005 nonn,easy %O A077005 2,2 %A A077005 _Amarnath Murthy_, Oct 26 2002 %E A077005 More terms from _Ralf Stephan_, Oct 31 2002 %E A077005 More terms from _Ray Chandler_, Oct 24 2003