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 A152598 #18 Nov 16 2023 07:44:53 %S A152598 1,2,6,8,18,24,31,38,72,105,129,630,1285,1542,2048,3112,3512,7710, %T A152598 7760,9728,27594,48834,60787,104694,140896,282224,384800,683720, %U A152598 1205998,1240672,1407592,4012472,4429250,4628480,16657248,69273666,107700228,254290896,319233186 %N A152598 Records in A001917. %H A152598 Amiram Eldar, <a href="/A152598/b152598.txt">Table of n, a(n) for n = 1..47</a> %F A152598 a(n) = A001917(A152597(n)). - _Amiram Eldar_, Nov 16 2023 %e A152598 First few terms of A001917 are 1, 1, 2, 1, 1, 2, 1, 2, 1, 6, so a(1) to a(3) are 1, 2, 6. %t A152598 ord[n_]:=Module[{x=1},While[PowerMod[2,x,n]!=1,x++];(n-1)/x];DeleteDuplicates[ ord/@Prime[Range[2,10^5]],GreaterEqual] (* The program generates the first 21 terms of the sequence. *) (* _Harvey P. Dale_, Oct 09 2022 *) %o A152598 (Magma) R:=[]; r:=0; for n in [2..100000] do p:=NthPrime(n); a:=(p-1)/Modorder(2, p); if r lt a then r:=a; Append(~R,a); end if; end for; print R; %Y A152598 Cf. A001917 ((p-1)/x, where p = prime(n) and x = smallest positive integer such that 2^x == 1 mod p), A152597 (where records occur in A001917). %K A152598 nonn %O A152598 1,2 %A A152598 _Klaus Brockhaus_, Dec 09 2008 %E A152598 More terms from _Vassilis Papadimitriou_, Mar 06 2010 %E A152598 More terms from _Vassilis Papadimitriou_, Mar 19 2010 %E A152598 a(37) from _Amiram Eldar_, Mar 08 2019 %E A152598 a(38)-a(39) from _Amiram Eldar_, Nov 16 2023