OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Andrew Howroyd)
Steven R. Finch, Idempotents and Nilpotents Modulo n, arXiv:math/0605019 [math.NT], 2006-2017.
FORMULA
Multiplicative with a(p^e) = p^floor(2*e/3) + (p-1)*p^(e-1) for prime p. - Andrew Howroyd, Jul 17 2018
Sum_{k=1..n} a(k) ~ c*n^2, where c = (1/2) * Product_{p prime} (1 - 1/(p^2*(p^3 + p^2 + p + 1))) = 0.49014556800434888957... - Amiram Eldar, Sep 08 2020
MATHEMATICA
a[n_] := Product[{p, e} = pe; p^Floor[2e/3] + (p-1) p^(e-1), {pe, FactorInteger[n]}];
Array[a, 72] (* Jean-François Alcover, Nov 11 2018, after Andrew Howroyd *)
PROG
(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); p^(2*e\3) + (p-1)*p^(e-1))} \\ Andrew Howroyd, Jul 17 2018
CROSSREFS
KEYWORD
mult,nonn
AUTHOR
Steven Finch, Apr 11 2006
STATUS
approved