A378220 Dirichlet inverse of phi(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).
1, -2, -4, -2, -6, 8, -10, -2, -4, 12, -12, 8, -16, 20, 24, -2, -18, 8, -22, 12, 40, 24, -28, 8, -6, 32, -4, 20, -30, -48, -36, -2, 48, 36, 60, 8, -40, 44, 64, 12, -42, -80, -46, 24, 24, 56, -52, 8, -10, 12, 72, 32, -58, 8, 72, 20, 88, 60, -60, -48, -66, 72, 40, -2, 96, -96, -70, 36, 112, -120, -72, 8, -78, 80, 24
Offset: 1
Links
Crossrefs
Programs
-
Mathematica
f[p_, e_] := 1 - NextPrime[p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 13 2025 *)
-
PARI
A378220(n) = factorback(apply(p -> 1-nextprime(1+p), factor(n)[, 1]));
-
Python
from math import prod from sympy import nextprime, primefactors def A378220(n): return prod(1-nextprime(p) for p in primefactors(n)) # Chai Wah Wu, Nov 23 2024