OFFSET
1,2
LINKS
Harry J. Smith, Table of n, a(n) for n=1..100
FORMULA
If n = Product_j (p_j)^(e_j) is the prime factorization of n, then a(n) = Product_j p_j^(n e_j - 1) * gcd(Product_j p_j, Product_j (p_j-1)). - Robert Israel, Jan 18 2018
MAPLE
f:= proc(n) local F, x;
F:= ifactors(n)[2];
mul(x[1]^(n*x[2]-1), x=F) * igcd(mul(x[1], x=F), mul(x[1]-1, x=F))
end proc:
map(f, [$1..100]); # Robert Israel, Jan 18 2018
PROG
(PARI) { for (n=1, 100, p=n^n; write("b064448.txt", n, " ", gcd(p, eulerphi(p))) ) } \\ Harry J. Smith, Sep 14 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 02 2001
STATUS
approved