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 A285711 #17 Apr 06 2020 07:52:07 %S A285711 1,1,1,2,1,4,1,4,3,2,1,1,1,8,1,8,1,4,1,4,9,4,1,2,5,2,9,16,1,1,1,16,1, %T A285711 2,1,8,1,4,3,8,1,6,1,8,3,8,1,4,7,10,1,4,1,12,5,1,3,2,1,2,1,32,1,32,1, %U A285711 2,1,4,1,2,1,16,1,2,5,8,1,18,1,16,27,2,1,3,1,4,1,16,1,3,1,16,3,16,1,1,1,8,3,20,1,2,1,8,3,2,1,24,1,10,3,2,1,6,1 %N A285711 a(n) = gcd(A051953(n), A079277(n)), a(1) = 1. %H A285711 Antti Karttunen, <a href="/A285711/b285711.txt">Table of n, a(n) for n = 1..10000</a> %F A285711 a(1) = 1; for n > 1, a(n) = gcd(A051953(n), A079277(n)). %t A285711 Table[GCD[n - EulerPhi@ n, If[n <= 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]]], {n, 115}] (* _Michael De Vlieger_, Apr 26 2017 *) %o A285711 (Scheme) (define (A285711 n) (if (= 1 n) n (gcd (A051953 n) (A079277 n)))) %o A285711 (Python) %o A285711 from sympy import divisors, totient, gcd %o A285711 from sympy.ntheory.factor_ import core %o A285711 def a007947(n): return max(i for i in divisors(n) if core(i) == i) %o A285711 def a079277(n): %o A285711 k=n - 1 %o A285711 while True: %o A285711 if a007947(k*n) == a007947(n): return k %o A285711 else: k-=1 %o A285711 def a(n): return 1 if n==1 else gcd(n - totient(n), a079277(n)) %o A285711 print([a(n) for n in range(1, 151)]) # _Indranil Ghosh_, Apr 26 2017 %Y A285711 Cf. A009195, A051953, A079277, A285707, A285709, A285710. %K A285711 nonn %O A285711 1,4 %A A285711 _Antti Karttunen_, Apr 26 2017