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 A252669 #32 Nov 13 2024 13:52:27 %S A252669 1,3,2,13,8,31,3,5,32,91,50,17,4,183,98,241,12,7,162,381,5,75,30,553, %T A252669 288,651,46,129,392,23,6,9,76,55,578,1261,100,47,722,1561,17,311,7, %U A252669 105,968,27,18,413,1152,11,1250,489,228,2863,34,3081,8,615,1682,217,1800,707 %N A252669 a(n) is the smallest integer k such that n*k mod (n+k) = 1, or -1 if no such k exists. %F A252669 a(a(n)) <= n. %t A252669 sik[n_]:=Module[{k=1},While[Mod[n*k,n+k]!=1,k++];k]; Array[sik,70] (* _Harvey P. Dale_, Aug 15 2015 *) %o A252669 (Python) %o A252669 import math %o A252669 for n in range(1,333): %o A252669 res=-1 %o A252669 for k in range(2**31-1): %o A252669 if ((n*k) % (n+k) == 1): %o A252669 res=k %o A252669 break %o A252669 print(res, end=', ') %o A252669 (PARI) a(n) = k=1; while ((n*k) % (n+k) != 1, k++); k; \\ _Michel Marcus_, Jan 08 2015 %Y A252669 Cf. A063427. %K A252669 nonn %O A252669 1,2 %A A252669 _Alex Ratushnyak_, Jan 02 2015