OFFSET
1,4
COMMENTS
The first even solution of the equation a(n) = n which divided by 2 is not a prime number is 8. Is there a larger such number? If such a number exists, is greater than 5*10^4. If no such number exists, consecutive even solutions of the above equation are consecutive terms of A073582.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10080
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
EXAMPLE
a(4) = gcd_2(1,4) + gcd_2(2,4) + gcd_2(3,4) + gcd_2(4,4) = 0 + 1 + 0 + 2 = 3.
MATHEMATICA
r[n_] := If[n==1, 0, n/FactorInteger[n][[1, 1]]]; a[n_] := Sum[r[GCD[n, k]], {k, 1, n}]; Array[a, 70] (* Amiram Eldar, Aug 06 2019 *)
PROG
(PARI)
A032742with_a1_0(n) = if(1==n, 0, n/vecmin(factor(n)[, 1]));
gcd_2(a, b) = A032742with_a1_0(gcd(a, b));
A309491(n) = sum(k=1, n, gcd_2(k, n)); \\ Antti Karttunen, Dec 28 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Lechoslaw Ratajczak, Aug 04 2019
EXTENSIONS
Definition clarified by Antti Karttunen, Dec 28 2019
STATUS
approved