OFFSET
1,2
FORMULA
PROG
(Haskell)
import Data.List (elemIndex)
import Data.Maybe (fromJust)
a071893 = (+ 1) . fromJust . (`elemIndex` a071891_list)
-- Reinhard Zumkeller, Jun 10 2012
(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
f(n) = my(x=a8(n)); (x-n)/gcd(x, n); \\ A071891
a(n) = my(k=1); while(f(k) != n, k++); k; \\ Michel Marcus, Feb 06 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, Jun 10 2002
EXTENSIONS
a(9)-a(10) from Michel Marcus, Feb 06 2022
a(11)-a(12) from Michel Marcus, Feb 08 2022
a(13) from Michel Marcus, Sep 21 2023
STATUS
approved