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 A285707 #25 May 07 2021 08:08:08 %S A285707 1,1,1,2,1,2,1,4,3,2,1,3,1,2,3,8,1,2,1,4,3,2,1,6,5,2,9,4,1,3,1,16,3,2, %T A285707 5,4,1,2,3,8,1,6,1,4,9,2,1,12,7,10,3,4,1,6,5,7,3,2,1,6,1,2,7,32,5,2,1, %U A285707 4,3,2,1,8,1,2,15,4,7,6,1,16,27,2,1,3,5,2,3,8,1,9,7,4,3,2,5,3,1,2,9,20,1,6,1,8,3,2,1,12,1,10,3,14,1,6,5,4,9 %N A285707 a(n) = gcd(n, A079277(n)), a(1) = 1. %H A285707 Antti Karttunen, <a href="/A285707/b285707.txt">Table of n, a(n) for n = 1..10000</a> %F A285707 a(1) = 1; for n > 1, a(n) = gcd(n, A079277(n)) = gcd(n, A285699(n)). %F A285707 a(n) = n / A285708(n). %t A285707 Table[GCD[n, #] &@ If[n <= 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]], {n, 117}] (* _Michael De Vlieger_, Apr 26 2017 *) %o A285707 (PARI) %o A285707 A007947(n) = factorback(factorint(n)[, 1]); %o A285707 A079277(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(1==n,0,k = n-1; while(A007947(k*n) <> r, k = k-1); k)); }; %o A285707 A285707(n) = if(1==n,n,gcd(A079277(n),n)); %o A285707 (Scheme) (define (A285707 n) (if (= 1 n) n (gcd n (A079277 n)))) %o A285707 (Python) %o A285707 from sympy import divisors, gcd %o A285707 from sympy.ntheory.factor_ import core %o A285707 def a007947(n): %o A285707 return max(i for i in divisors(n) if core(i) == i) %o A285707 def a079277(n): %o A285707 k=n - 1 %o A285707 while True: %o A285707 if a007947(k*n) == a007947(n): return k %o A285707 else: k-=1 %o A285707 def a(n): return 1 if n==1 else gcd(n, a079277(n)) %o A285707 print([a(n) for n in range(1, 151)]) # _Indranil Ghosh_, Apr 26 2017 %Y A285707 Cf. A009195, A079277, A285699, A285708, A285711. %K A285707 nonn,look %O A285707 1,4 %A A285707 _Antti Karttunen_, Apr 26 2017