login
a(n) = Min_{k | A071891(k) = n}.
2

%I #24 Sep 21 2023 08:22:33

%S 1,2,16,86,484,46,5048,2529,144944,5042,3348556,144938,51306028

%N a(n) = Min_{k | A071891(k) = n}.

%F A071891(a(n)) = n and A071891(m) <> n for m < a(n). - _Reinhard Zumkeller_, Jun 10 2012

%o (Haskell)

%o import Data.List (elemIndex)

%o import Data.Maybe (fromJust)

%o a071893 = (+ 1) . fromJust . (`elemIndex` a071891_list)

%o -- _Reinhard Zumkeller_, Jun 10 2012

%o (PARI) a8(n) = if(n<2, return(2)); if ((n>2) && isprime(n), return (2*n)); my(m=n+1); while(!issquarefree(m) || gcd(m, n)==1, m++); m; \\ A071888

%o f(n) = my(x=a8(n)); (x-n)/gcd(x, n); \\ A071891

%o a(n) = my(k=1); while(f(k) != n, k++); k; \\ _Michel Marcus_, Feb 06 2022

%Y Cf. A071891, A071890, A071889, A071888.

%K nonn,more

%O 1,2

%A _Reinhard Zumkeller_, Jun 10 2002

%E a(9)-a(10) from _Michel Marcus_, Feb 06 2022

%E a(11)-a(12) from _Michel Marcus_, Feb 08 2022

%E a(13) from _Michel Marcus_, Sep 21 2023