A355930 Sum of the prime indices of n minus the sum of the prime indices of the smallest number with same prime signature as n, when the sum is taken with multiplicity, as in A056239.
0, 0, 1, 0, 2, 0, 3, 0, 2, 1, 4, 0, 5, 2, 2, 0, 6, 1, 7, 1, 3, 3, 8, 0, 4, 4, 3, 2, 9, 0, 10, 0, 4, 5, 4, 0, 11, 6, 5, 1, 12, 1, 13, 3, 3, 7, 14, 0, 6, 3, 6, 4, 15, 2, 5, 2, 7, 8, 16, 0, 17, 9, 4, 0, 6, 2, 18, 5, 8, 2, 19, 0, 20, 10, 4, 6, 6, 3, 21, 1, 4, 11, 22, 1, 7, 12, 9, 3, 23, 1, 7, 7, 10, 13, 8, 0, 24, 5, 5, 2, 25, 4, 26, 4, 3
Offset: 1
Keywords
Examples
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.
Links
Crossrefs
Programs
-
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 *)
-
PARI
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523 A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i, 2] * primepi(f[i, 1]))); } A355930(n) = (A056239(n) - A056239(A046523(n)));
Comments