OFFSET
1,3
COMMENTS
a(n) = n-1 iff n = 1 or n is prime;
a(A098374(n)) = 1;
a(n) = #{m: gcd(n,a(m)) = A098372(n)}.
Notes from Antti Karttunen, Mar 30 2021: (Start)
The original definition was: #{m: gcd(n, a(m)) = Max_{k=1..n-1} gcd(n, a(k))}, but it hardly seems well-defined unless the range of m is somehow restricted.
Informally the definition could be expressed as: Number of k in range 1..n-1 for which gcd(n, a(k)) attains the maximal such gcd-value that occurs in the same range.
(End)
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..8192
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
PROG
(PARI) A098371list(up_to) = { my(v=vector(up_to)); v[1] = 1; for(n=2, #v, my(m=1); for(k=1, n-1, m = max(m, gcd(n, v[k]))); v[n] = sum(k=1, n-1, m == gcd(n, v[k]))); (v); }; \\ Antti Karttunen, Mar 30 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Sep 05 2004
EXTENSIONS
Definition clarified by Antti Karttunen, Mar 30 2021
STATUS
approved