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 A057237 #26 Dec 28 2021 13:28:30 %S A057237 1,1,2,1,4,1,6,1,2,1,10,1,12,1,2,1,16,1,18,1,2,1,22,1,4,1,2,1,28,1,30, %T A057237 1,2,1,4,1,36,1,2,1,40,1,42,1,2,1,46,1,6,1,2,1,52,1,4,1,2,1,58,1,60,1, %U A057237 2,1,4,1,66,1,2,1,70,1,72,1,2,1,6,1,78,1,2,1,82,1,4,1,2,1,88,1,6,1,2,1 %N A057237 Maximum k <= n such that 1, 2, ..., k are all relatively prime to n. %C A057237 In reduced residue system for n [=RRS(n)] the [initial] segment of consecutive integers, i.e. of which no number is missing is {1,2,....,a[n]}. The first missing term from RRS(n) is 1+a(n), the least prime divisor.. E.g. n=121 : RRS[121] = {1,2,3,4,5,6,7,8,9,10,lag,12,..}, i.e. no 11 is in RRS; a[n] is the length of longest lag-free number segment consisting of consecutive integers, since A020639[n] divides n. - _Labos Elemer_, May 14 2003 %C A057237 a(n) is also the difference between the smallest two divisors of n, (the column 1 of A193829), if n >= 2. - _Omar E. Pol_, Aug 31 2011 %H A057237 Antti Karttunen, <a href="/A057237/b057237.txt">Table of n, a(n) for n = 1..65537</a> %F A057237 For n >= 2, a(n) = (smallest prime dividing n) - 1 = A020639(n) - 1. %F A057237 For n >= 2, a(n) = (n-1) mod (smallest prime dividing n); cf. A083218. - _Reinhard Zumkeller_, Apr 22 2003 %e A057237 a(25) = 4 because 1, 2, 3 and 4 are relatively prime to 25. %t A057237 Join[{1},Table[Length[Split[Boole[CoprimeQ[n,Range[n-1]]]][[1]]],{n,2,100}]] (* _Harvey P. Dale_, Dec 28 2021 *) %o A057237 (PARI) a(n) = if (n==1, 1, factor(n)[1,1] - 1); \\ _Michel Marcus_, May 29 2015 %Y A057237 Cf. A020639, A083218. %Y A057237 Cf. A066169. %K A057237 nonn %O A057237 1,3 %A A057237 _Leroy Quet_, Sep 20 2000