OFFSET
1,2
LINKS
FORMULA
MATHEMATICA
f[p_, e_] := 1 - NextPrime[p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 13 2025 *)
PROG
(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
CROSSREFS
KEYWORD
sign,mult,changed
AUTHOR
Antti Karttunen, Nov 23 2024
STATUS
approved