login
A322361
a(n) = gcd(n, A003961(n)), where A003961 is completely multiplicative with a(prime(k)) = prime(k+1).
19
1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 7, 9, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 3, 1, 1, 1, 7, 1, 9, 1, 1, 5, 1, 11, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 35
OFFSET
1,6
LINKS
FORMULA
a(n) = gcd(n, A003961(n)).
a(n) = A003961(gcd(n, A064989(n))).
MATHEMATICA
a[n_] := If[n == 1, 1, GCD[n, Times@@(NextPrime[First[#]]^Last[#] &/@FactorInteger[n])]]; Array[a, 100] (* Amiram Eldar, Dec 05 2018~ *)
PROG
(PARI)
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
A322361(n) = gcd(n, A003961(n));
(Python)
from math import gcd, prod
from sympy import nextprime, factorint
def A322361(n): return gcd(n, prod(nextprime(p)**e for p, e in factorint(n).items())) # Chai Wah Wu, Dec 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 05 2018
STATUS
approved