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 A058665 #28 Dec 12 2021 20:07:42 %S A058665 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, %T A058665 1,1,1,1,5,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3, %U A058665 5,1,1,1,1,1,1,1,1,1,1,3,1,1,1,5,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,7,1 %N A058665 a(n) = gcd(n+1, n-phi(n)). %C A058665 a(n) = 1 for most n. True for all primes and other integers. %H A058665 Antti Karttunen, <a href="/A058665/b058665.txt">Table of n, a(n) for n = 1..10000</a> %F A058665 a(n) = gcd(n+1, cototient(n)) = gcd(n+1, A051953(n)). %e A058665 n = 247 = 13*19, n+1 = 248 = 8*31, phi(247) = 12*18 = 216, cototient(247) = 247-216 = 31, so a(247) = gcd(248,31) = 31. %t A058665 Table[GCD[n+1,n-EulerPhi[n]],{n,0,110}] (* _Harvey P. Dale_, Dec 24 2012 *) %o A058665 (PARI) A058665(n) = gcd(n+1, n-eulerphi(n)); \\ _Antti Karttunen_, Jul 28 2017 %o A058665 (Python) %o A058665 from sympy import gcd, totient %o A058665 def a(n): return gcd(n + 1, n - totient(n)) %o A058665 print([a(n) for n in range(1, 51)]) # _Indranil Ghosh_, Jul 29 2017 %Y A058665 Cf. A000010, A051953, A009195. %K A058665 nonn %O A058665 1,1 %A A058665 _Labos Elemer_, Dec 28 2000 %E A058665 Offset corrected by _Antti Karttunen_, Jul 28 2017