OFFSET
1,10
COMMENTS
a(n) = 0 iff n is a prime power p^a, a >= 1.
Contribution from Daniel Forgues, Nov 16 2009: (Start)
a(n) = (product of prime power components of n) - (sum of prime power components of n).
a(1) = (product of prime power components of 1) - (sum of prime power components of 1)
a(1) = (empty product) - (empty sum) = 1 - 0 = 1. (End)
LINKS
Daniel Forgues, Table of n, a(n) for n = 1..100000
FORMULA
a(n) = n - A008475(n).
EXAMPLE
a(1) = 1 - (0) = 1,
a(8) = 8 - (2^3) = 0,
a(10) = 10 - (2^1 + 5^1) = 3.
MATHEMATICA
Join[{1}, Array[# - Total[MapApply[Power, FactorInteger[#]]] &, 100, 2]] (* Paolo Xausa, Mar 16 2024 *)
PROG
(PARI) sof(n)=local(x); x=factor(n); sum(i=1, length(x[, 1]), x[i, 1]^x[i, 2]); for(i=1, 60, print1(i-sof(i)", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Jul 27 2003
EXTENSIONS
Corrected (a(1) changed from 0 to 1) and edited by Daniel Forgues, Nov 14 2009
STATUS
approved