login
A086664
a(n) = n - (sum of prime power components of n).
1
1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 5, 0, 5, 7, 0, 0, 7, 0, 11, 11, 9, 0, 13, 0, 11, 0, 17, 0, 20, 0, 0, 19, 15, 23, 23, 0, 17, 23, 27, 0, 30, 0, 29, 31, 21, 0, 29, 0, 23, 31, 35, 0, 25, 39, 41, 35, 27, 0, 48
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
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
Cf. A008475.
Sequence in context: A369700 A347361 A175919 * A164736 A349343 A109753
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