OFFSET
1,5
COMMENTS
a(n) gives the signature excitation of n (a concept proposed by Allan C. Wechsler, indicating the distance of n from the terms of A025487), when the primes in the "excited state", i.e., those present in A328478(n), are de-excited one by one, and the prime signature of n is preserved. See the example.
LINKS
FORMULA
EXAMPLE
For n = 98 = 2*7*7, the other 7 is de-excited as 7 -> 5 -> 3 -> 2, and the other 7 is de-excited as 7 -> 5 -> 3, to get 2*2*3 = 12 = A046523(98). There are 3+2 de-excitations in total, therefore a(98) = 5.
MATHEMATICA
{0}~Join~Array[Total@ Flatten[ConstantArray[PrimePi[#1], #2] & @@@ #] - Total@ Flatten@ MapIndexed[ConstantArray[First[#2], #1] &, ReverseSort[#[[All, -1]]]] &@ FactorInteger[#] &, 104, 2] (* Michael De Vlieger, Nov 02 2022 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen as suggested by Don Reble, Oct 25 2022
STATUS
approved