OFFSET
0,3
COMMENTS
For a very few primes, a(p) > 1 (then by necessity a(p) = p). In range 2 .. 2^25 there are three: 2, 11, 119039.
LINKS
FORMULA
a(n) = gcd(n, A276154(n)).
PROG
(PARI)
A276151(n) = { my(s=1); forprime(p=2, , if(n%p, return(n-s), s *= p)); };
A276152(n) = { my(s=1); forprime(p=2, , if(n%p, return(s*p), s *= p)); };
A002110(n) = prod(i=1, n, prime(i));
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
A276086(n) = { my(i=0, m=1, pr=1, nextpr); while((n>0), i=i+1; nextpr = prime(i)*pr; if((n%nextpr), m*=(prime(i)^((n%nextpr)/pr)); n-=(n%nextpr)); pr=nextpr); m; };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 26 2019
STATUS
approved