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 A215653 #25 Mar 16 2025 13:10:17 %S A215653 2,3,2,3,4,5,6,3,8,9,10,5,12,13,4,7,16,17,18,9,8,21,22,5,24,25,26,13, %T A215653 28,11,30,15,10,33,6,17,36,37,14,9,40,13,42,21,19,45,46,7,48,49,16,25, %U A215653 52,53,21,13,20,57,58,11,60,61,8,31,14,23,66,33,22,29 %N A215653 a(n) = smallest positive m such that m^2 = 1+k*n with positive k. %C A215653 Apparently a(n) = A070667(n) for n > 2. Note the linear patterns in the graph. %H A215653 Amiram Eldar, <a href="/A215653/b215653.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Zak Seidov) %H A215653 Dorin Andrica and Vlad Crişan, <a href="https://www.jstor.org/stable/48662476">The Smallest Nontrivial Solution to x^k == 1 (mod n) and Related Sequences</a>, Amer. Math. Monthly, Vol. 126, No. 2 (2019), pp. 173-178. %F A215653 a(n) = sqrt(1+n*A076942(n)). %F A215653 a(n) = sqrt(A061369(n)). - _Amiram Eldar_, Mar 16 2025 %e A215653 a(1) = 2, k = 3; a(2) = 3, k = 4; a(3) = 2, k = 1; a(1000) = 249, k = 62. %t A215653 Flatten[{2,Table[Select[Range[2,1000],PowerMod[#,2,k]==1&,1],{k,2,1000}]}] (* first 1000 terms *) %o A215653 (PARI) a(n) = {my(m = n + 1); while(!issquare(m), m += n); sqrtint(m);} \\ _Amiram Eldar_, Mar 16 2025 %Y A215653 Cf. A061369, A070667, A076942. %K A215653 nonn %O A215653 1,1 %A A215653 _Zak Seidov_, Aug 19 2012