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!)
A345266 a(n) = Sum_{p|n, p prime} gcd(p,n/p). 7
0, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 2, 2, 1, 4, 1, 3, 2, 2, 1, 3, 5, 2, 3, 3, 1, 3, 1, 2, 2, 2, 2, 5, 1, 2, 2, 3, 1, 3, 1, 3, 4, 2, 1, 3, 7, 6, 2, 3, 1, 4, 2, 3, 2, 2, 1, 4, 1, 2, 4, 2, 2, 3, 1, 3, 2, 3, 1, 5, 1, 2, 6, 3, 2, 3, 1, 3, 3, 2, 1, 4, 2, 2, 2, 3, 1, 5, 2, 3, 2, 2, 2, 3, 1, 8, 4, 7, 1, 3, 1, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(p) = 1 for p prime.
From Wesley Ivan Hurt, Nov 21 2021: (Start)
a(n) = A056169(n) + A063958(n).
If n is squarefree, then a(n) = omega(n).
a(p^k) = p for primes p and k >= 2. (End)
EXAMPLE
a(18) = Sum_{p|18} gcd(p,18/p) = gcd(2,9) + gcd(3,6) = 1 + 3 = 4.
MATHEMATICA
Table[Sum[GCD[k, n/k] (PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
PROG
(PARI) a(n) = my(f=factor(n), p); sum(k=1, #f~, p=f[k, 1]; gcd(p, n/p)); \\ Michel Marcus, Jun 16 2021
(PARI) A345266(n) = vecsum(apply(p->gcd(p, n/p), factor(n)[, 1])); \\ Antti Karttunen, Nov 13 2021
CROSSREFS
Cf. A001221 (omega), A007947 (rad), A008472 (sopf), A345302.
Sequence in context: A352202 A266161 A072203 * A217581 A366521 A348581
KEYWORD
nonn,look
AUTHOR
Wesley Ivan Hurt, Jun 13 2021
EXTENSIONS
Data section extended up to 105 terms by Antti Karttunen, Nov 13 2021
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 17 21:22 EDT 2024. Contains 371767 sequences. (Running on oeis4.)