login
a(n) = gcd(A071888(n), n).
6

%I #16 Oct 18 2019 10:24:32

%S 1,2,3,2,5,2,7,2,3,2,11,2,13,7,3,2,17,3,19,2,3,2,23,2,5,2,3,2,29,3,31,

%T 2,3,2,7,2,37,2,3,2,41,2,43,2,3,2,47,3,7,5,3,2,53,3,5,2,3,2,59,2,61,2,

%U 3,2,5,3,67,2,3,2,71,2,73,2,3,2,7,2,79,2,3,2,83,2,5,2,3

%N a(n) = gcd(A071888(n), n).

%C For n > 1: a(n)=n iff n is prime.

%H Reinhard Zumkeller, <a href="/A071889/b071889.txt">Table of n, a(n) for n = 1..10000</a>

%o (Haskell)

%o a071889 n = gcd n $ a071888 n -- _Reinhard Zumkeller_, Jun 10 2012

%o (PARI) a(n)=if(n<2, return(1)); my(m=n+1); while(gcd(m++,n)==1 || !issquarefree(m), ); gcd(n, m-n) \\ _Charles R Greathouse IV_, May 29 2014

%Y Cf. A071888, A071892.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jun 10 2002