|
|
A309491
|
|
Let gcd_2(b,c) be the second-largest common divisor of non-coprime integers b and c; then a(n) = Sum_{k=1..n} gcd_2(k,n). If b and c are coprime, then gcd_2(b,c) = 0.
|
|
2
|
|
|
0, 1, 1, 3, 1, 6, 1, 8, 5, 10, 1, 17, 1, 14, 11, 20, 1, 26, 1, 29, 15, 22, 1, 44, 9, 26, 21, 41, 1, 56, 1, 48, 23, 34, 17, 73, 1, 38, 27, 76, 1, 80, 1, 65, 51, 46, 1, 108, 13, 74, 35, 77, 1, 102, 25, 108, 39, 58, 1, 157, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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));
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|