OFFSET
1,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Prime Factor.
Eric Weisstein's World of Mathematics, Prime Zeta Function.
FORMULA
If n is a prime power p^k, k>0, a(n) = p; otherwise a(n) = 0.
Dirichlet g.f. sum_{p prime} p/(p^s-1) = sum_{k>0} primezeta(ks-1).
a(n) = A061397(A007947(n)). - Reinhard Zumkeller, Sep 19 2011, corrected by Antti Karttunen, Jan 31 2021
a(n) = Sum_{k=2..n} k*A010051(k)*(floor(k^n/n)-floor((k^n -1)/n)). - Anthony Browne, Jun 17 2016
If A297109(n) = 0, then a(n) = 0, otherwise a(n) = A000040(A297109(n)). - Antti Karttunen, Feb 01 2021
MATHEMATICA
Table[If[Length@ # == 1, #[[1, 1]], 0] &@ FactorInteger@ n, {n, 96}] /. 1 -> 0 (* Michael De Vlieger, Jun 19 2016 *)
Table[If[PrimePowerQ[n], FactorInteger[n][[1, 1]], 0], {n, 100}] (* Harvey P. Dale, Jan 25 2020 *)
PROG
(Haskell)
a120007 1 = 0
a120007 n | until ((> 0) . (`mod` spf)) (`div` spf) n == 1 = spf
| otherwise = 0
where spf = a020639 n
-- Reinhard Zumkeller, Sep 19 2011
(PARI) A120007(n) = { my(v); if(isprimepower(n, &v), v, 0); }; \\ Antti Karttunen, Jan 31 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Jun 02 2006
STATUS
approved