login
a(n) = gcd(n, phi(n) * (phi(n) + 1)).
1

%I #21 Jul 19 2016 10:45:13

%S 1,2,3,2,5,6,7,4,3,10,11,4,13,14,3,8,17,6,19,4,3,22,23,24,5,26,9,4,29,

%T 6,31,16,3,34,5,12,37,38,3,8,41,6,43,4,15,46,47,16,7,10,3,4,53,18,5,8,

%U 3,58,59,4,61,62,9,32,1,6,67,4,3,10,71,24,73,74,5,4,1,6,79,16,27,82,83,12

%N a(n) = gcd(n, phi(n) * (phi(n) + 1)).

%H Harry J. Smith, <a href="/A062789/b062789.txt">Table of n, a(n) for n = 1..2000</a>

%t Table[GCD[n, EulerPhi[n]*(EulerPhi[n] + 1)], {n, 75}] (* _Stefan Steinerberger_, Apr 03 2006 *)

%t ep[n_]:=Module[{epn=EulerPhi[n]},GCD[n,epn(epn+1)]]; Array[ep,90] (* _Harvey P. Dale_, Jun 23 2011 *)

%o (PARI) for (n=1, 2000, p=eulerphi(n); write("b062789.txt", n, " ", gcd(n, p*(p + 1)))) \\ _Harry J. Smith_, Aug 11 2009

%o (Haskell)

%o a062789 n = gcd n (phi * (phi + 1)) where phi = a000010 n

%o -- _Reinhard Zumkeller_, Oct 07 2015

%Y Cf. A009195, A000010, A039649.

%K easy,nice,nonn

%O 1,2

%A _Reinhard Zumkeller_, Jul 19 2001

%E More terms from _Stefan Steinerberger_, Apr 03 2006

%E More terms from _Harry J. Smith_, Aug 11 2009