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!)
A332845 a(n) = (-1)^omega(n) * Sum_{k=1..n} (-1)^omega(n/gcd(n, k)), where omega = A001221. 1
1, 0, 1, 2, 3, 0, 5, 6, 7, 0, 9, 2, 11, 0, 3, 14, 15, 0, 17, 6, 5, 0, 21, 6, 23, 0, 25, 10, 27, 0, 29, 30, 9, 0, 15, 14, 35, 0, 11, 18, 39, 0, 41, 18, 21, 0, 45, 14, 47, 0, 15, 22, 51, 0, 27, 30, 17, 0, 57, 6, 59, 0, 35, 62, 33, 0, 65, 30, 21, 0, 69, 42, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = (-1)^omega(n) * Sum_{d|n} (-1)^omega(d) * phi(d).
a(p) = p - 2, where p is prime.
From Amiram Eldar, Nov 01 2022: (Start)
Multiplicative with a(p^e) = p^e - 2.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (1 - 2/(p*(p+1)) = A307868 / 2 = 0.2358403068... . (End)
MATHEMATICA
Table[(-1)^PrimeNu[n] Sum[(-1)^PrimeNu[n/GCD[n, k]], {k, 1, n}], {n, 1, 73}]
Table[(-1)^PrimeNu[n] Sum[(-1)^PrimeNu[d] EulerPhi[d], {d, Divisors[n]}], {n, 1, 73}]
f[p_, e_] := p^e - 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; s = Array[a, 100] (* Amiram Eldar, Nov 01 2022 *)
PROG
(PARI) a(n) = (-1)^omega(n) * sum(k=1, n, (-1)^omega(n/gcd(n, k))); \\ Michel Marcus, Feb 26 2020
(PARI) a(n) = {my(f = factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] - 2); } \\ Amiram Eldar, Nov 01 2022
CROSSREFS
Cf. A000010, A001221, A016825 (positions of 0's), A049060, A058026, A074722, A076479, A307868.
Sequence in context: A055615 A366390 A243059 * A351079 A190621 A325314
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Feb 26 2020
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 May 1 10:17 EDT 2024. Contains 372163 sequences. (Running on oeis4.)