login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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));
A309491(n) = sum(k=1, n, gcd_2(k, n)); \\ Antti Karttunen, Dec 28 2019
CROSSREFS
Sequence in context: A336645 A349910 A168111 * A109646 A199783 A329645
KEYWORD
nonn
AUTHOR
Lechoslaw Ratajczak, Aug 04 2019
EXTENSIONS
Definition clarified by Antti Karttunen, Dec 28 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)