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 A098654 #8 Jul 24 2021 13:31:28 %S A098654 4,341,451,481,671,703,1105,1111,1333,1729,2465,3277,3281,3721,3775, %T A098654 4681,4753,5461,5611,5963,6031,6601,6981,7107,8149,8695,8911,9005, %U A098654 9637,12673,14701,14981,15841,18721,22177,23001,24211,28939,29089,29341,29503,29891,31621 %N A098654 Records in A007535. %H A098654 Jinyuan Wang, <a href="/A098654/b098654.txt">Table of n, a(n) for n = 1..432</a> %t A098654 f[n_] := Block[{k = n + 1}, While[ PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++ ]; k]; a = {1}; b = {4}; Do[ c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[{n, c}]], {n, 2, 10^6}]; b %Y A098654 Cf. A007535, A098653. %K A098654 nonn %O A098654 1,1 %A A098654 _Robert G. Wilson v_, Sep 19 2004 %E A098654 Name corrected by _Jinyuan Wang_, Jul 24 2021