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

%I #11 Nov 01 2022 04:59:13

%S 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,

%T 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,

%U 30,17,0,57,6,59,0,35,62,33,0,65,30,21,0,69,42,71

%N a(n) = (-1)^omega(n) * Sum_{k=1..n} (-1)^omega(n/gcd(n, k)), where omega = A001221.

%H Amiram Eldar, <a href="/A332845/b332845.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = (-1)^omega(n) * Sum_{d|n} (-1)^omega(d) * phi(d).

%F a(p) = p - 2, where p is prime.

%F From _Amiram Eldar_, Nov 01 2022: (Start)

%F Multiplicative with a(p^e) = p^e - 2.

%F 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)

%t Table[(-1)^PrimeNu[n] Sum[(-1)^PrimeNu[n/GCD[n, k]], {k, 1, n}], {n, 1, 73}]

%t Table[(-1)^PrimeNu[n] Sum[(-1)^PrimeNu[d] EulerPhi[d], {d, Divisors[n]}], {n, 1, 73}]

%t f[p_, e_] := p^e - 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; s = Array[a, 100] (* _Amiram Eldar_, Nov 01 2022 *)

%o (PARI) a(n) = (-1)^omega(n) * sum(k=1, n, (-1)^omega(n/gcd(n, k))); \\ _Michel Marcus_, Feb 26 2020

%o (PARI) a(n) = {my(f = factor(n)); prod(i=1, #f~, f[i,1]^f[i,2] - 2); } \\ _Amiram Eldar_, Nov 01 2022

%Y Cf. A000010, A001221, A016825 (positions of 0's), A049060, A058026, A074722, A076479, A307868.

%K nonn,mult

%O 1,4

%A _Ilya Gutkovskiy_, Feb 26 2020

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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)